Hello,
I have a handler that is sending lots of small messages to mongrel2 over
one connection in a very short period of time and running on the same
machine. I appear to be exceeding the value of DELIVER_OUTSTANDING_MSGS
16. the errors are:
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/connection.c:253: HTTP TO HANDLER: 7bb16
8ef-9078-4e5c-b055-0838f4d677c8 7 /database/as_csv
917:{"PATH":"/database/as_csv","x-forwarded-for":"127.0.0.1","accept-language":"en-US,en;q=0.8","accept-encod
ing":"gzip,deflate,sdch","connection":"keep-alive","referer":"http://localhost:5
123/database/SubstructureSearch_Results?show_table=True&user_fields_sha1=198d764650cce6c85bdd677e0b598d9ac61f8667&query_str=%25","accept-charset":"ISO-8859-1,ut
f-8;q=0.7,*;q=0.3","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","user-agent":"Mozilla/5.0
(Macintosh; Intel Mac OS X 10_6_8) Apple
WebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57
Safari/537.1","host":"localhost:5123","cookie":"_drugsite=9ef76f52-5d08-4560-ad37-f569d833fb60","METHOD":"G
ET","VERSION":"HTTP/1.1","URI":"/database/as_csv?search_type=SubstructureSearch&user_fields_sha1=198d764650cce6c85bdd677e0b598d9ac61f8667","QUERY":"search_type=
SubstructureSearch&user_fields_sha1=198d764650cce6c85bdd677e0b598d9ac61f8667","P
ATTERN":"/"},0:,
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/state.rl:53: --> parse(REQ_SENT:111)
State_exec:53Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/handler.c:124: Sending raw
message to 46 length 8
* snip *
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/handler.c:124: Sending raw message to
46 length 205
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/connection.c:88: Too many outstanding
messages
Fri, 10 Aug 2012 16:30:56 GMT [ERROR] (src/handler.c:126: errno: None) Error
sending raw message to HTTP listener on FD 46, closing them.
Fri, 10 Aug 2012 16:30:56 GMT [ERROR] (src/handler.c:152: errno: None) Failed
to deliver to connection 7 on socket 46
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/register.c:221: Id 7 not registered.
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/register.c:221: Id 7 not registered.
* snip *
Fri, 10 Aug 2012 16:30:56 GMT [ERROR] (src/io.c:673: errno: Bad file
descriptor) Write error when sending all.
Fri, 10 Aug 2012 16:30:56 GMT [ERROR] (src/connection.c:925: errno: None) Error
delivering to MSG listener on FD -1, closing them.
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/task/task.c:227: FREEING TASK: 0x15341e0
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/task/fd.c:240: Socket 46 was closed
after a wait.
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/io.c:504: Socket was closed, will
return only what's available: 0
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/connection.c:970: Client closed during
read.
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/state.rl:52: --> close(CLOSE:100)
State_exec:52
Fri, 10 Aug 2012 16:30:56 GMT DEBUG src/task/task.c:227: FREEING TASK: 0x152bd90
Fri, 10 Aug 2012 16:31:01 GMT DEBUG src/mongrel2.c:207: No connections timed
out.
What would be the consequences of increasing the value to say 256 or
even higher than 1024?
One could argue that the handler is broken as it is splitting the
message into lots of very small messages (length less than 210), but as
a stopgap measure, I would like to, for the time being increase the
number of outstanding messages and see how that impacts the performance
of mongrel2.
--Jeff