[peruser] intermittent problem with long-running requests

Dave Steinberg dave-peruser at redterror.net
Fri Jan 21 11:02:00 MST 2011


On 1/21/2011 12:32 PM, Dave Steinberg wrote:
> Hi folks, first, this may be a tricky problem since it seems entirely
> inconsistent. Good times!
>
> I've noticed since switching to peruser that some requests seem to
> randomly return with what my load balancer (Pound) translates into a 500
> error code of "Internal server error". Upon deeper investigation, Pound
> is not the problem, since I ran Apache jmeter directly against my web
> backend and produced similar results.
>
> I have a very simple script that intentionally takes a long time (~20
> seconds) to complete its work. The script is:
>
> ====
> #! /usr/bin/perl
>
> $| = 1;
>
> print "Content-type: text/html\n\n";
>
> print "<html><head><title>trickling write test</title></head><body>\n";
>
> for (my $i = 1; $i < 20; $i++) {
> print "--> $i <br>" ;
> sleep 1;
> }
>
> print "</body></html>";
>
> exit 0;
> ====
>
> If I run jmeter against that URL for a few hundred iterations, I get
> anywhere from 10-30% error rates. The error I'm getting isn't a HTTP
> error, but rather, a premature EOF (i.e. no HTTP response is sent).
>
> I cranked my LogLevel to debug, but so far I haven't seen anything in
> the logs that is interesting. Likewise, server-status shows 100%
> availability for all workers.
>
> My peruser config is:
> IdleTimeout 600
> ExpireTimeout 1800
> MinSpareProcessors 5
> MaxSpareProcessors 15
> StartProcessors 5
> MinProcessors 0
> #MaxProcessors 100
> MaxProcessors 400
> ServerLimit 3000
> MaxClients 1500
> MaxRequestsPerChild 1000
> #MinMultiplexers 100
> MinMultiplexers 15
> MaxMultiplexers 200
> MultiplexerIdleTimeout 600
> ProcessorWaitTimeout 10
> MaxCPUUsage 50
> # works, but prevents cores
> #MultiplexerChroot /var/empty
>
> # define a default processor
> <Processor global_default>
> User www
> Group www
> </Processor>
> ServerEnvironment global_default
>
> Any suggestions welcome, including debugging tips. :/

Just following up quickly - I did some more poking with the test script. 
  I get approximately a 2% error rate when the loop variable is dropped 
to '2', i.e. 2 seconds per request, minimum.  At 0 or 1, I can't detect 
any errors in 1000 iterations.

Do other people see similar results in their peruser setups?

PS: 'ab -n 20 -c 1000' ought to produce equivalent results to what I'm 
seeing in jmeter.

-- 
Dave Steinberg
http://www.geekisp.com/
http://www.steinbergcomputing.com/
http://www.redterror.net/


More information about the Peruser mailing list