[En-Nut-Discussion] Http server - ethereal

Dusan Ferbas dferbas at dfsoft.cz
Tue Feb 24 15:42:03 CET 2004


Hi,

I experienced something similar 4 months ago. I reported it as a lost FIN 
packets.

I suggest to collect our observations with Nut's TCP. I am interested if 
this appears to happen also with SMC chip on Ethernut 2 boards ? And what 
are memory and sockets configuration of your applications - how many 
threads, amount of available heap, how many http threads, which options are 
set, how many files needed for your web page, etc.

Detailed comment follows:
----
If you do not know stream length at the beginning then Content-Length is 
missing in http header. Web browser waits for connection close to assume 
file was fully sent. If FIN is lost then it waits (IE and Mozilla 1.5 
tested) forever.

This never happens if there is a need only for 1 concurrent http 
connection. We have 1 html and 2 small picture files (667 and 884 bytes). 
Sometimes it happens that both pictures are not loaded. Then we have a .swf 
file (30kB) and 2 .xml files. With .swf we are sending Content-Length and 
never experienced unsent file (hopefully Flash will not start otherwise). 
Sometimes it happens that .xml (without Content-Length) are not loaded. 
Reloading by Ctrl-R (Mozilla) or Reload button always helps. We know Nut is 
not restarted even due to watch dog reset.

This behaviour got better after Oliver Schulz contributed his timing 
changes in TCP.

Hope this helps a little and directs to some debugging effort. I think that 
this can happen according either to problems with packet transfer from RTL 
chip or because of some misusage or crossusage of event resources.

>         u_long ul;
>         ul = 3000;
>         NutTcpSetSockOpt (sock, SO_SNDTIMEO, &ul, sizeof(ul));
>
>         if (NutTcpSetSockOpt(sock, TCP_MAXSEG, &tcp_mss, sizeof(tcp_mss)))
>                 LOG_MSG("%u. Cannot set MSS sock opt\n", id);
>
>         if (NutTcpSetSockOpt(sock, SO_SNDBUF, &tcp_mss, sizeof(tcp_mss)))
>                 LOG_MSG("%u. Cannot set output buffer sock opt\n", id);
>
>         NutTcpAccept(sock, gBoardDatap->http_port); // Listen on http 
> port (default:80). If we return, we got a client.

>Date: Tue, 24 Feb 2004 16:05:36 +0800
>From: "Damian Slee" <damian at commtech.com.au>
>Subject: RE: [En-Nut-Discussion] Http server - ethereal
>To: "Ethernut User Chat (English)" <en-nut-discussion at egnite.de>
>
>
>I have been looking at this in more detail today, cause I have had the
>same problem as Cosmin since I started using ethernut 6+months ago.
>
>Running latest CVS, and new realtek driver.  I had this problem before
>the new realtek driver.
>
>I have a frames page with 3 sections in it, so 3 html files + frame
>setup html file.  Only text content + forms on the pages.
>
>The problem is that the main frame with a form on it sits there trying
>to load for about 20 seconds, then it loads.  I have traced this with
>Ethereal.  If I click on one of my menu links in the left frame, forcing
>browser to open new connection, the form loads imediately.
>
>Originally I though this was cause I was only running 2 http threads,
>but changing this to 4 or 8 makes no difference.  Like Cosmin indicated
>last week.
>
>...
>
>Any ideas on how to move forward on this?


Dusan Ferbas
www.dfsoft.cz 




More information about the En-Nut-Discussion mailing list