server loops on closed ajp13 connection (freezes)
In a faulty setup (lighttpd & ajp13 proxy configured, tomcat partly configured only), restarting tomcat while sending requests intended for the servlet causes lighttpd to freeze.
When it happens, the server is trapped in a loop which prevents it from being nicely stopped. Only a "kill -9" helps.
I narrowed it down to mod_proxy_backend_ajp13.c:709 and changed :
} while (in->first && res == HANDLER_GO_ON);
} while (in->first && !in->is_closed && res == HANDLER_GO_ON);
I do not know the server's code structure at all, so it might be a wrong place for patching this and might be handled much better elsewhere.
But this actually does the trick.
Don't hesitate asking for more info and/or a precise test case.
Also available in: Atom