You should not be setting connect-timeout so high. The default is 15 seconds. 
That timeout only covers being able to create the TCP socket connection to the 
listener socket of the daemon process. Nothing to do with how long requests 
take to be handled.

Anyway, what is the remainder of your configuration for mod_wsgi? What is 
WSGIApplicationGroup and WSGIScriptAlias set to?

What are all the log messages being put out by mod_wsgi at the time this 
occurs. Ensure you are using Apache LogLevel of info rather than err or warn. 
Using info will result in more about what mod_wsgi is doing being displayed.

If I had to guess, it would be that you are not setting:

    WSGIApplicationGroup %{GLOBAL}

resulting in your application running in a Python sub interpreter, but you are 
using a Python package which uses a C extension where the C extension doesn't 
work properly in a sub interpreter. This can result in a thread deadlock and 
the sort of problem you are seeing.

So if only have the one WSGI application, set that WSGIApplicationGroup 
directive.

BTW, if you do need a timeout on requests, use request-timeout with 
WSGIDaemonProcess.

Finally, you should not need to add /usr/lib64/python3.4/site-packages to 
python-path. If that is required, there is something broken about your setup, 
perhaps including that mod_wsgi is not compiled for that Python version.

> On 9 Jun 2020, at 8:11 pm, Mahesh Vernekar <[email protected]> wrote:
> 
> Hi Graham,
> 
> Occasionally we are getting "Timeout when reading response headers from 
> daemon process" in apache error log.
> 
> In apache config below is the setting.
> WSGIDaemonProcess author.knowdl.com 
> python-path=/opt/data/knauthor/knauthor:/usr/lib64/python3.4/site-packages 
> connect-timeout=360
> 
> Do you recommend removed the connect-timeout parameter ?
> 
> 
> 
> Regards
> 
> 
> Mahesh
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/modwsgi/3af75635-40a0-4369-a711-48d91fac7fbfo%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/modwsgi/3af75635-40a0-4369-a711-48d91fac7fbfo%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/29A861CC-7C37-451E-87EC-96F1088C8712%40gmail.com.

Reply via email to