[En-Nut-Discussion] Http server - ethereal

Damian Slee damian at commtech.com.au
Wed Feb 25 03:04:59 CET 2004


Originally 3 threads(1socket, 1uart, 1watchdog) + idle thread + 2 http
threads
Tried yesterday 3 threads + idle thread + 8 http threads
Tried yesterday NUTDEBUG 2 threads + idle thread + 8 http threads.
Problem disappeared.
Tried yesterday 2 threads + idle thread + 8 http threads. Problem
re-appears

Content-Length sent with the 4 html files loaded. 1 index + 3 frame html
files. They are all crurom generated.  Always the last one gets stuck.

Tried the old NIC driver again this morning, still the same.
 
Ethernut does seem to go very quiet for that Syn retry 6 second period,
like its either not receiving anything, or trying to respond, and its
not being sent.  Which of these, I'll try find out today.


-----Original Message-----
From: Dusan Ferbas [mailto:dferbas at dfsoft.cz] 
Sent: Tuesday, 24 February 2004 10:42 PM
To: en-nut-discussion at egnite.de
Subject: Re: RE: [En-Nut-Discussion] Http server - ethereal

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

_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion





More information about the En-Nut-Discussion mailing list