2008/5/30 Graham Dumpleton <[EMAIL PROTECTED]>:
>> class FooController(BaseController):
>>
>>     def bla(self):
>>         return 'Hello World! %s' % time.time()
>>
>>     def slow_bla(self):
>>         time.sleep(10)
>>         return 'Hello slow World!'
>>
>> With something like that, manual testing works just fine (ie: I'm able
>> to hit the action bla as many times as I want while the action
>> slow_bla is still serving).
>>
>> When testing with ab though, I do get failed requests, but I actually
>> get even more failed requests with Apache/mod_wsgi.
>
> What options are you using to 'ab'?

-n 1000 -c 3

> The 'ab' program can give a perception of errors, normally manifesting
> as lots of exceptions on server side in log file, if you use
> concurrent requests. This occurs because it only stops when it
> receives responses for the number of requests you tell it to make.
> With a request handler that takes a long time, because of a sleep()
> call, the 'ab' program can actually issue more requests than you tell
> it to. When it does receive responses for the number you told it, it
> will simply shutdown the connections for all the additional requests
> it made which it hasn't yet received a response. The result of this is
> that on the server side it will see a bunch of closed connections
> causing failures to be able to write the responses for the additional
> requests.

Note that I didn't test against the action that does a sleep. I'm a
bit confused by your explanation. Does it mean that the errors should
show up in the logs on the server side? I was only looking at ab's
output.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to