* Re: [ECOS] "Fix" for atHTTP and HTTP socket requirements with mozilla POSTS
@ 2007-06-15 12:51 Tad
0 siblings, 0 replies; 3+ messages in thread
From: Tad @ 2007-06-15 12:51 UTC (permalink / raw)
To: ecos-discuss
IE6 appears to use just original connection for all POSTS/GETS.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ECOS] "Fix" for atHTTP and HTTP socket requirements with mozilla POSTS
@ 2007-06-13 6:56 Tad
0 siblings, 0 replies; 3+ messages in thread
From: Tad @ 2007-06-13 6:56 UTC (permalink / raw)
To: ecos-discuss
<Reposted to get correct thread>
"Fix" for hanging atHTTP client requests on out-of-sockets.
Background:
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
that.
"Solution:"
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ECOS] Re: accept() FreeBSD hangs when out of resources
@ 2007-06-11 23:15 Tad
2007-06-12 3:51 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Tad @ 2007-06-11 23:15 UTC (permalink / raw)
To: ecos-discuss
>> accept() won't return and won't timeout (>12hrs) when listen() indicates
>> a new connection, if out of sockets/file-descriptors and all TCP
>> connections are in ESTABLISHED state.
>
> Where exactly is it blocked. Please could you provide a call stack.
Couldn't see why it would hang either, Andrew, but seems to reliably.
Wish I could help more. Submitted 20 hrs of digging. My system doesn't
have any gdb or printf capablities. Think I gave enough reproduction
situation for someone with gdb capabilities to take it further.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] Re: accept() FreeBSD hangs when out of resources
2007-06-11 23:15 [ECOS] Re: accept() FreeBSD hangs when out of resources Tad
@ 2007-06-12 3:51 ` Andrew Lunn
2007-06-12 4:05 ` [ECOS] " Tad
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2007-06-12 3:51 UTC (permalink / raw)
To: Tad; +Cc: ecos-discuss
On Mon, Jun 11, 2007 at 03:42:07PM -0800, Tad wrote:
> >>accept() won't return and won't timeout (>12hrs) when listen() indicates
> >>a new connection, if out of sockets/file-descriptors and all TCP
> >>connections are in ESTABLISHED state.
> >
> >Where exactly is it blocked. Please could you provide a call stack.
>
> Couldn't see why it would hang either, Andrew, but seems to reliably.
>
> Wish I could help more. Submitted 20 hrs of digging. My system doesn't
> have any gdb or printf capablities. Think I gave enough reproduction
> situation for someone with gdb capabilities to take it further.
For situations like this i find working on the synthetic target much
better. You have full gdb support, diag_printf etc.
What i would ideally like is a test case we can add to the standard
tests. The test case should fail now, but once we have fix the problem
we can keep the test case for regression tests.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] Re: Re: accept() FreeBSD hangs when out of resources
2007-06-12 3:51 ` Andrew Lunn
@ 2007-06-12 4:05 ` Tad
2007-06-12 11:06 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Tad @ 2007-06-12 4:05 UTC (permalink / raw)
To: ecos-discuss
Andrew Lunn wrote:
> What i would ideally like is a test case we can add to the standard
> tests. The test case should fail now, but once we have fix the problem
> we can keep the test case for regression tests.
16 rapid http POSTS to any ATHTTP server compiled with 16 max sockets
should lock the server up forever (as long as they're
<CYG_HTTPD_SOCKET_IDLE_TIMEOUT(300) secs so the TCP conns stay in
ESTABLISHED rather than TIMED_WAIT)
FWIW, I raised the both MAX file NFD, NFILES? while keeping the
MAX_SOCKETS the same with no change.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] Re: Re: accept() FreeBSD hangs when out of resources
2007-06-12 4:05 ` [ECOS] " Tad
@ 2007-06-12 11:06 ` Andrew Lunn
2007-06-12 11:19 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2007-06-12 11:06 UTC (permalink / raw)
To: Tad; +Cc: ecos-discuss
On Mon, Jun 11, 2007 at 04:14:45PM -0800, Tad wrote:
> Andrew Lunn wrote:
> >What i would ideally like is a test case we can add to the standard
> >tests. The test case should fail now, but once we have fix the problem
> >we can keep the test case for regression tests.
>
> 16 rapid http POSTS to any ATHTTP server compiled with 16 max sockets
> should lock the server up forever (as long as they're
> <CYG_HTTPD_SOCKET_IDLE_TIMEOUT(300) secs so the TCP conns stay in
> ESTABLISHED rather than TIMED_WAIT)
So, maybe you can modify the server test case, assuming there is one,
by adding a new thread which makes 16 connections to 127.0.0.1:80.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] Re: Re: accept() FreeBSD hangs when out of resources
2007-06-12 11:06 ` Andrew Lunn
@ 2007-06-12 11:19 ` Andrew Lunn
[not found] ` <466F2FC7.8060704@ds3switch.com>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2007-06-12 11:19 UTC (permalink / raw)
To: Tad; +Cc: eCos Disuss
On Tue, Jun 12, 2007 at 05:51:04AM +0200, Andrew Lunn wrote:
> On Mon, Jun 11, 2007 at 04:14:45PM -0800, Tad wrote:
> > Andrew Lunn wrote:
> > >What i would ideally like is a test case we can add to the standard
> > >tests. The test case should fail now, but once we have fix the problem
> > >we can keep the test case for regression tests.
> >
> > 16 rapid http POSTS to any ATHTTP server compiled with 16 max sockets
> > should lock the server up forever (as long as they're
> > <CYG_HTTPD_SOCKET_IDLE_TIMEOUT(300) secs so the TCP conns stay in
> > ESTABLISHED rather than TIMED_WAIT)
>
> So, maybe you can modify the server test case, assuming there is one,
> by adding a new thread which makes 16 connections to 127.0.0.1:80.
Actually, tcp_lo_test.c probably has 90% of the code you need for
writing a much simpler test case.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-15 8:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-15 12:51 [ECOS] "Fix" for atHTTP and HTTP socket requirements with mozilla POSTS Tad
-- strict thread matches above, loose matches on Subject: below --
2007-06-13 6:56 Tad
2007-06-11 23:15 [ECOS] Re: accept() FreeBSD hangs when out of resources Tad
2007-06-12 3:51 ` Andrew Lunn
2007-06-12 4:05 ` [ECOS] " Tad
2007-06-12 11:06 ` Andrew Lunn
2007-06-12 11:19 ` Andrew Lunn
[not found] ` <466F2FC7.8060704@ds3switch.com>
2007-06-13 0:09 ` [ECOS] "Fix" for atHTTP and HTTP socket requirements with mozilla POSTS Tad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).