Hi

I am trying to simulate some waiting in helloworld so i modified it:

def hello_http(req):
    dummy = (yield sleep(0.5))
    yield http.http_response(req, 200, headers, content)


now it works when i look into webbrowser,
it works when run:

 ab -k -c 2 -n 10 'http://127.0.0.1:8888/

but when i run:

ab -k -c 200 -n 1000 'http://127.0.0.1:8888/'

i can see following exception in helloworld stderr:

[Tue Nov  3 23:46:51 2009] {error} -- Unhandled Exception in main loop
--
[Tue Nov  3 23:46:51 2009] {error} Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/diesel/app.py", line 49, in run
    self.hub.handle_events()
  File "build/bdist.linux-x86_64/egg/diesel/hub.py", line 93, in
handle_events
    self.events[fd][0]()
  File "build/bdist.linux-x86_64/egg/diesel/core.py", line 406, in
handle_read
    self.shutdown(True)
  File "build/bdist.linux-x86_64/egg/diesel/core.py", line 363, in
shutdown
    self.g.throw(ConnectionClosed)
  File "build/bdist.linux-x86_64/egg/diesel/core.py", line 161, in
cycle_all
    item = current.throw(*error)
  File "build/bdist.linux-x86_64/egg/diesel/protocols/http.py", line
216, in __call__
    yield self.request_handler(req)
ConnectionClosed

ab does not indicate any problems or failed requests.

I'd like to understand what happened. It seems that ab closed
connection before receiving full response, am i right?
And if thats true, then why it did that?

Reply via email to