This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: httpd web server question. Thanks a lot.


"QiangHuang" <jameshq@liverpool.ac.uk> writes:

> Hi all:
>    I am using httpd web server, but I encounter a problem as:
> in ecos configuation when set  "max number of open sockets = 16"  then the
> web browser request the web page without problem in the first 15 times and
> when approaching the 16 times the browser will delay for a longer periode
> and sometime will just can't find the web page but after that when rehit the
> refresh it works fine for the next 15 accessing, but whenever comes to the
> every 16 times that happens again. seems the client socket which has been
> used not closed properly so I tried to put a "close(client_socket)" after
> "cyg_httpd_process()" in httpd.c but it doesn't work out the problem. Does
> anyone have any idea about this? Thanks a lot.

This is a feature of the TCP protocol. When a connection is closed the
stack cannot just delete the socket data structures immediately. If
the last packet sent was lost, it must be able to respond sensibly to
a timeout and retry from the remote end. For this reason the socket is
kept for about 90s after the close.

The need to keep eCos memory usage small means that this happens
earlier and more frequently than it would in BSD. If you really want
to sit there and keep hitting the reload button on your browser, then
increase the open socket count.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]