On Wednesday, 20 July 2011 22:37:08 E R wrote: > I am wondering how time spent in a cleanup handler affects page > response time. > > For instance, if I do a sleep(1) in a cleanup handler, will my page > delivery times be increased by a second? > Or will other available mod-perl child processes pick up pending > requests until the cleanup handler returns?
it depends. If the connection is closed after the request the worker will be busy but the client won't notice it because the next request establishes a new connection to another worker. If the connection is kept alive the client will think the request is done and send the next one over the same connection. But the server will start processing it only when the cleanup handler returns. If possible use an external queue processor (similar to a printer spooler or a mail queue) to do such things. If that's not possible queue the work internally (in $r->connection->pnotes for example) and use a $r- >connection->pool cleanup handler. That one runs when the connection is closed. Don't set MaxKeepAliveRequests to 0. Torsten Förtsch -- Need professional modperl support? Hire me! (http://foertsch.name) Like fantasy? http://kabatinte.net