OK, that makes sense now.  Thanks for the quick response!
-Greg

On Tuesday, April 14, 2015 at 3:42:19 PM UTC-7, Graham Dumpleton wrote:
>
> Unfortunately the shutdown timeout how you are using it doesn’t work with 
> Apache graceful restart. The way that Apache manages these other processes, 
> ie., mod_wsgi daemon processes, is that it will kill them after 3 seconds 
> on a graceful restart if they haven’t shutdown already. So the long 
> requests will be holding the process running and so they get killed after 3 
> seconds regardless. This is why you see the 'Truncated or oversized 
> response headers’ message. Is because the daemon process went away while 
> Apache child worker process was still waiting for a response due to worker 
> process happily staying around due to graceful restart.
>
> No good solution for the problem that I know of at this point to do a 
> whole of Apache graceful restart such that the daemon processes aren’t 
> impacted.
>
> Graham
>
> On 14 Apr 2015, at 6:37 pm, Greg Janée <[email protected] <javascript:>> 
> wrote:
>
> No segfault... the log looks like this:
>
> [Tue Apr 14 13:18:27 2015] [notice] SIGUSR1 received.  Doing graceful 
> restart
> [Tue Apr 14 13:18:30 2015] [error] [client ...] Truncated or oversized 
> response headers...
>
> The longish shutdown timeout is because this system performs transactions 
> that can take significant real time to perform; this is not a system that 
> is rapidly returning page views.  When deploying new code by reloading 
> modwsgi, the long shutdown timeout has been invaluable because it allows 
> the current transactions to complete cleanly.
>
> I should add, the reason why I've been poking around with Apache's 
> graceful restart is I was looking for a way to safely restart Apache in the 
> same way that I can currently safely reload modwsgi ("safely" meaning that 
> current operations are allowed to finish and incoming requests are queued 
> until the server is ready again).
>
> -Greg
>
>
> On Tuesday, April 14, 2015 at 3:21:22 PM UTC-7, Graham Dumpleton wrote:
>>
>> That message can occur for another reason when doing a graceful restart.
>>
>> Do you see an actual Segmentation fault message in the main Apache error 
>> log?
>>
>> If there is no segmentation fault, it is likely to be this other reason. 
>> At least, it wouldn’t mean it is crashing.
>>
>> However, why specifically are you running with shutdown-timeout of 60. 
>> Normally that would be 5 and you wouldn’t generally want to play with it.
>>
>> Graham
>>
>> On 14 Apr 2015, at 6:15 pm, Greg Janée <[email protected]> wrote:
>>
>> I'm running modwsgi in daemon mode and getting a "Truncated or oversized 
>> response headers received..." error from Apache, which I believe means the 
>> daemon died.  This happens when I do an Apache graceful restart and there 
>> is an open HTTP connection being handled by modwsgi at the time of the 
>> restart.  The daemon dies almost immediately.  If there is no open HTTP 
>> connection, then a graceful restart works fine.  An ordinary (non-graceful) 
>> restart also works.
>>
>> This is a mature modwsgi/Django application that runs just fine in every 
>> other way.  I don't think I've ever tried doing a graceful restart before, 
>> so it's entirely possible this behavior has always been there and I just 
>> didn't notice it.
>>
>> My version of modwsgi is pretty recent I believe.  If the issue is with 
>> Apache, I could upgrade to 2.4.x, but it's not obvious that that is 
>> relevant here.
>>
>> Apache 2.2.17, MPM worker mode
>> modwsgi 4.4.9
>> Python 2.7.6
>>
>> MPM config:
>> ServerLimit 6
>> StartServers 2
>> MaxClients 150
>> ThreadsPerChild 25
>> MinSpareThreads 25
>> MaxSpareThreads 75
>>
>> modwsgi config:
>> WSGIDaemonProcess site-1 threads=50 shutdown-timeout=60
>> WSGIApplicationGroup %{GLOBAL}
>> WSGIProcessGroup site-1
>> WSGIPassAuthorization on
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "modwsgi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/modwsgi.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to