For you to get a 500 error would imply your requests weren't able to finish within 2.5 seconds, which is how long they would be given before the process was killed off anyway.
How long do your requests run for? In mod_wsgi 4.0 there will be slightly more flexibility in this, because a separate graceful shutdown phase is introduced: """ 2. Add potentially graceful process restart option for daemon processes when sent a graceful restart signal. Signal is usually SIGUSR1 but is platform dependent as using same signal as Apache would use. If the graceful-timeout option had been provided to WSGIDaemonProcess, then the process will attempt graceful shutdown first based on the that timeout, otherwise normal shutdown procedure used as if received a SIGTERM. """ What this means is that when the graceful restart signal is received, it will still keep accepting requests, but if it becomes idle within the graceful shutdown time period, it will exit and restart immediately. If it doesn't become idle within that period, it will go into the normal forced shutdown sequence, where accepting of new requests will be stopped and if it doesn't become idle before the shutdown timeout (default 2.5 seconds), it will be forcibly killed and restarted. Graham On 30/08/2013, at 9:19 PM, Tomek Paczkowski <[email protected]> wrote: > Hello, > > I have an legacy application with nasty memory fragmentation problem. > I would like to kill child process when it reaches certain memory level, but > I want it to finish the requests it is serving. > I tried sending SIGINT, but it caues apache to return 500 to current requests. > Is there something else I could try? Documentation search yielded no answers. > > Best regards > Tomek > > -- > 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/groups/opt_out. -- 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/groups/opt_out.
