[ECOS] "Fix" for atHTTP and HTTP socket requirements with mozilla POSTS

Tad ecos_removethispart@ds3switch.com
Wed Jun 13 06:56:00 GMT 2007

<Reposted to get correct thread>

"Fix" for hanging atHTTP client requests on out-of-sockets.

It's somewhat known that atHTTP will "pause" for several minutes when 
running out of sockets.  One reason this can happen is that mozilla 
opens a new TCP connection for each POST or chunked-transfer(I think) 
GET, which requires a new socket for each.  The remnant sockets 
eventually (300sec default) are shutdown by atHTTP and then enter TCP 
TIME_WAIT state which is 2xMSL or something like another 2-4 minutes -- 
but that's a long time.  BTW, this assumes you don't hit the bug where 
accept() hangs when out of sockets.  See solution in a couple days for 

Mozilla (on XP) appears to get smart after opening about 10 TCP 
connections, and starts FIN,ACK ing them to shut them down so atHTTP 
doesn't have to sit in TIME_WAIT or atHTTP timeout on the old connections.

So, setting CYGPKG_NET_MAXSOCKETS to something > 10x # of users + a 
couple for sockets other eCos apps have open will allow "unlimited" 
mozilla (XP) client requests without any timeouts.

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

More information about the Ecos-discuss mailing list