<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HTTP Server Max Sessions in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-Max-Sessions/m-p/746922#M17737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jchepler:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried this issue with other brower? like IE or firefox?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can try to set the default session to 6 or decrease the timeout value to check whether there is any improvement.&lt;/P&gt;&lt;P&gt;If you need good performance, you may need more memory in your system.&lt;/P&gt;&lt;P&gt;When a client connects to the server, the server task creates&amp;nbsp; a child task to handle communication with the accepted socket, so memory for the child task's stack is needed. There is one child task for each connected client.&lt;/P&gt;&lt;P&gt;I would recommend to debug this issue with TAD. There you can see how much memory is left after RTCS_create, after socket init, application layer init, like httpsever start...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, please also refer to below thread, it might helpful for you.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/320610#320610"&gt;https://community.nxp.com/message/320610#320610&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2018 07:29:39 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2018-06-06T07:29:39Z</dc:date>
    <item>
      <title>HTTP Server Max Sessions</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-Max-Sessions/m-p/746921#M17736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having issues when first loading the webpage of an embedded webserver.&amp;nbsp; I think it is due to the amount of TCP connections Chrome is requesting when I first try to load the page.&amp;nbsp; Please read through my perceived description of the cause/problem and let me know your suggestions.&amp;nbsp; &amp;nbsp;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using KSDK 1.3.0 with MQX with a K64F processor.&amp;nbsp; I am hosting a webserver and have defined the max number of HTTP sessions to 2.&amp;nbsp; I noticed that when I am trying to load the webpage from a browser it takes 20 seconds for the webpage to initially load.&amp;nbsp; After it is loaded, there are no issues with the 1 second timeout refresh built-in to the webpage / javascript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used wireshark to view the packets.&amp;nbsp; When I type the webpage into the Chrome, and before hitting enter, Chrome already sends out 6 TCP SYN packets.&amp;nbsp; I see that the embedded webserver responds to each of the 6 SYN packets with a SYN, ACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I view the task states, there are two "HTTP Server Session" tasks present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets lets say the client uses ports 60001 - 60006 to connect to port 80 of the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The webserver, I believe, only keeps the 2 most recent sessions (60005 and 60006).&amp;nbsp; When I press enter on the address bar, wireshark shows the port of the 1st request from the client is the one requesting the HTTP page (60001).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this connection is not established anymore, the webserver waits up to 20 seconds (HTTPSRVCFG_SES_TO) to close 60005/60006 connections due to inactivity.&amp;nbsp; Once it is closed, then it responds to the 60001 port request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I go about getting the webserver to work faster on the initial load of the page?&amp;nbsp; Should I re-compile with changing the HTTPSRVCFG_SES_TO to something like 1 second?&amp;nbsp; I don't really want to set the max number of sessions to 6 because of the limited amount of RAM on the controller.&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 20:48:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-Max-Sessions/m-p/746921#M17736</guid>
      <dc:creator>jschepler</dc:creator>
      <dc:date>2018-05-11T20:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Server Max Sessions</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-Max-Sessions/m-p/746922#M17737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jchepler:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried this issue with other brower? like IE or firefox?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can try to set the default session to 6 or decrease the timeout value to check whether there is any improvement.&lt;/P&gt;&lt;P&gt;If you need good performance, you may need more memory in your system.&lt;/P&gt;&lt;P&gt;When a client connects to the server, the server task creates&amp;nbsp; a child task to handle communication with the accepted socket, so memory for the child task's stack is needed. There is one child task for each connected client.&lt;/P&gt;&lt;P&gt;I would recommend to debug this issue with TAD. There you can see how much memory is left after RTCS_create, after socket init, application layer init, like httpsever start...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, please also refer to below thread, it might helpful for you.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/320610#320610"&gt;https://community.nxp.com/message/320610#320610&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 07:29:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/HTTP-Server-Max-Sessions/m-p/746922#M17737</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2018-06-06T07:29:39Z</dc:date>
    </item>
  </channel>
</rss>

