On 12/03/2015, at 1:13 AM, Dmitriy Chugunov <[email protected]> wrote:
> > > среда, 11 марта 2015 г., 1:08:49 UTC+3 пользователь Graham Dumpleton написал: > > Any chance you can upgrade to a current version of mod_wsgi? > > Well... It would be better not to upgrade. So I will consider upgrading only > as a last resort. > > Additional options were added in a version after you are using which allow > connect and socket timeout to be set separately > > What options are you talking about? > > , overriding the default of using Apache Timeout directive, for the > connection between the Apache child worker processes and mod_wsgi daemon > process. > > My script contains a few queries and only one can require much time. So I > don't think that it's a good idea to change timeouts for all of them. Hmmm, not sure why I got the idea that newer version was required. Think I may have been wrongly looking at when they got exposed in mod_wsgi-express. The options you need were actually added in version 4.1.0. 9. Add ``connect-timeout`` option to ``WSGIDaemonProcess`` to allow a timeout to be specified on how long the Apache child worker processes should wait on being able to obtain a connection to the mod_wsgi daemon process. As UNIX domain sockets are used, connections should always succeed, however there have been some incidences seen which could only be explained by the operating system hanging on the initial connect call without being added to the daemon process socket listener queue. As such the timeout has been added. The timeout defaults to 15 seconds. This timeout also now dictates how long the Apache child worker process will attempt to get a connection to the daemon process when the connection is refused due to the daemon socket listener queue being full. Previously how long connection attempts were tried was based on an internal retry count rather than a configurable timeout. 10. Add ``socket-timeout`` option to ``WSGIDaemonProcess`` to allow the timeout on indvidual read/writes on the socket connection between the Apache child worker and the daemon process to be specified separately to the Apache ``Timeout`` directive. If this option is not specified, it will default to the value of the Apache ``Timeout`` directive. So try with low Apache Timeout directive of 60, but higher socket-timeout option. As to this only affecting certain URLs, then you would want to look at partitioning your application vertically based on URL. For an explanation of this see: http://blog.dscpl.com.au/2014/02/vertically-partitioning-python-web.html So you can delegate these URLs to a mod_wsgi daemon process group of their own with a different daemon process group configuration. Graham -- 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.
