Fwd: Re: 100% cpu with APR on Windows

2011-07-29 Thread Eric van der Maarel
Hi, Maybe the patch is required as an attachment? Here it is. Can it be included in apr? Regards, Eric --- apr.orig/poll/unix/select.c 2009-10-02 18:24:00.0 +0200 +++ apr/poll/unix/select.c 2011-07-07 14:55:29.0 +0200 @@ -149,6 +149,14 @@ break; }

Re: 100% cpu with APR on Windows

2011-07-07 Thread Eric van der Maarel
On 07/06/2011 03:58 PM, Mladen Turk wrote: On 07/06/2011 02:52 PM, Eric van der Maarel wrote: Hi, Recently I proposed a fix for the select version of apr_pollset_poll implementation, that prevents cpu going to 100% when all clients have disconnected (http://mail-archives.apache.org/mod_mbox/apr

Re: 100% cpu with APR on Windows

2011-07-06 Thread Mladen Turk
On 07/06/2011 02:52 PM, Eric van der Maarel wrote: Hi, Recently I proposed a fix for the select version of apr_pollset_poll implementation, that prevents cpu going to 100% when all clients have disconnected (http://mail-archives.apache.org/mod_mbox/apr-dev/201106.mbox/browser). It actually prov

Re: 100% cpu with APR on Windows

2011-07-06 Thread Eric van der Maarel
Hi, Recently I proposed a fix for the select version of apr_pollset_poll implementation, that prevents cpu going to 100% when all clients have disconnected (http://mail-archives.apache.org/mod_mbox/apr-dev/201106.mbox/browser). It actually provides the select impl. of poll with the ability to is

Re: 100% cpu with APR on Windows

2011-06-24 Thread Eric van der Maarel
On 05/29/2011 10:53 PM, Jeff Trawick wrote: On Fri, May 27, 2011 at 3:59 PM, Justin Erenkrantz wrote: On Fri, May 27, 2011 at 9:48 AM, wrote: Can you outline the idioms you refer to that prefer a select() implementation? iow, how different are they from apr_socket_create set socket nonbloc

Re: Re: 100% cpu with APR on Windows

2011-05-29 Thread Jeff Trawick
On Fri, May 27, 2011 at 3:59 PM, Justin Erenkrantz wrote: > On Fri, May 27, 2011 at 9:48 AM,   wrote: >> Can you outline the idioms you refer to that prefer a select() >> implementation? >> >> iow, how different are they from >> >> apr_socket_create >> set socket nonblocking with no timeout >> apr

Re: Re: 100% cpu with APR on Windows

2011-05-27 Thread Justin Erenkrantz
On Fri, May 27, 2011 at 9:48 AM, wrote: > Can you outline the idioms you refer to that prefer a select() > implementation? > > iow, how different are they from > > apr_socket_create > set socket nonblocking with no timeout > apr_socket_connect() > apr_pollset_poll() That's all serf is doing. Wi

Re: Re: 100% cpu with APR on Windows

2011-05-27 Thread trawick
On , Justin Erenkrantz wrote: On Thu, May 26, 2011 at 10:30 PM, Justin Erenkrantz jus...@erenkrantz.com> wrote: > Has anyone else seen this behavior? Anybody have any clever > workarounds? -- justin Using apr_pollset_create_ex() with APR_POLLSET_SELECT allows serf to be happy on

Re: 100% cpu with APR on Windows

2011-05-27 Thread Justin Erenkrantz
On Thu, May 26, 2011 at 10:30 PM, Justin Erenkrantz wrote: > Has anyone else seen this behavior?  Anybody have any clever > workarounds?  -- justin Using apr_pollset_create_ex() with APR_POLLSET_SELECT allows serf to be happy on Win32. Besides connect() failing, there is at least one other failu

Re: 100% cpu with APR on Windows

2011-05-27 Thread Justin Erenkrantz
On Fri, May 6, 2011 at 4:01 AM, Jeff Trawick wrote: > WSAPoll() is available with Vista/2008 Server and later.  It should be > used automatically by APR without rebuilding your code (via a run-time > check for presence of the Windows API). > > As far as WSAPoll() and this issue...  MS doc says > >

Re: 100% cpu with APR on Windows

2011-05-06 Thread Jeff Trawick
On Fri, May 6, 2011 at 4:28 AM, Eric van der Maarel wrote: > On 05/05/2011 10:17 PM, Jeff Trawick wrote: >> >> On Thu, May 5, 2011 at 3:20 PM, Eric van der Maarel >>  wrote: >>> >>> Hi, >>> >>> Further investigation reveals a difference between running Tomcat on >>> Linux and Windows. From the To

Re: 100% cpu with APR on Windows

2011-05-06 Thread Eric van der Maarel
On 05/05/2011 10:17 PM, Jeff Trawick wrote: On Thu, May 5, 2011 at 3:20 PM, Eric van der Maarel wrote: Hi, Further investigation reveals a difference between running Tomcat on Linux and Windows. From the Tomcat Poller thread the apr_pollset_poll() is called. When a client in the pollset has d

Re: 100% cpu with APR on Windows

2011-05-05 Thread Jeff Trawick
On Thu, May 5, 2011 at 3:20 PM, Eric van der Maarel wrote: > Hi, > > Further investigation reveals a difference between running Tomcat on > Linux and Windows. From the Tomcat Poller thread the apr_pollset_poll() > is called. When a client in the pollset has disconnected, under Linux > this call re

Re: 100% cpu with APR on Windows

2011-05-05 Thread Eric van der Maarel
Hi, Further investigation reveals a difference between running Tomcat on Linux and Windows. From the Tomcat Poller thread the apr_pollset_poll() is called. When a client in the pollset has disconnected, under Linux this call returns (in the rtnevents member of the descriptors resultset) 49

Re: 100% cpu with APR on Windows

2011-05-04 Thread Eric van der Maarel
Hi, I'm in a team with Richard. We already noticed that Stefan Ruppert's original patch didn't do the trick. We've also applied the other diffs from rev. 1089433, to no avail. It seems we are not in the situation that 1089433 fixes. When we encounter the problem, we never have num == 0 or poll

Re: 100% cpu with APR on Windows

2011-04-28 Thread Richard van der Laan
Hi Jeff, Thanks for the reply. I will apply the patch and see if it solves our problem. Regards, Richard On 28 apr. 2011, at 15:33, "Jeff Trawick" wrote: > On Thu, Apr 28, 2011 at 9:17 AM, Richard van der Laan > wrote: >> Hi, >> >> We use GraniteDS and server push based on APR from Tomcat

Re: 100% cpu with APR on Windows

2011-04-28 Thread William A. Rowe Jr.
On 4/28/2011 9:32 AM, Jeff Trawick wrote: > > This is what you need, right? (sorry, in a rush at the moment) > > http://svn.apache.org/viewvc?view=revision&revision=1089433 > > IIRC, wrowe mentioned holding off this Windows change/fix/whatever to > 1.5.x and doc it for 1.4.x. IMO it is okay to

Re: 100% cpu with APR on Windows

2011-04-28 Thread Mladen Turk
On 04/28/2011 03:32 PM, Jeff Trawick wrote: On Thu, Apr 28, 2011 at 9:17 AM, Richard van der Laan wrote: Hi, Anybody with a similar experience and/or solution? This is what you need, right? (sorry, in a rush at the moment) http://svn.apache.org/viewvc?view=revision&revision=1089433 IIRC,

Re: 100% cpu with APR on Windows

2011-04-28 Thread Jeff Trawick
On Thu, Apr 28, 2011 at 9:17 AM, Richard van der Laan wrote: > Hi, > > We use GraniteDS and server push based on APR from Tomcat native 1.1.20 in > JBoss-4.2.3. > When we connect to the server with a client flex app which sets up the comet > connection and then stop the client (e.g. stop the brows

100% cpu with APR on Windows

2011-04-28 Thread Richard van der Laan
Hi, We use GraniteDS and server push based on APR from Tomcat native 1.1.20 in JBoss-4.2.3. When we connect to the server with a client flex app which sets up the comet connection and then stop the client (e.g. stop the browser running the app) the server's CPU utilization becomes 100%. This happe