Open cosmicnet opened 2 weeks ago
Odd. The standard apachectl from the original httpd distribution should only send a signal to the httpd process and nothing more. If it is hanging waiting then it could only be because the Linux distribution has modified apachectl to do something else.
A few comments.
Firstly, relying on ExecCGI/AddHandler to execute Python WSGI scripts is in general not recommended. Use WSGIDaemonProcess/WSGIProcessGroup/WSGIScriptAlias instead.
Second, avoid Anaconda Python distribution if you can and use standard Python distribution. Anaconda Python keeps breaking embedding in various ways so don't guarantee it will work.
Finally, if you aren't using mod_perl and mod_fcgid then disable them and don't load them in Apache in case it is a conflict with them.
Hi,
I'm new to WSGI, in putting together a basic test I found that apache will take 90 seconds to restart after any wsgi script has been called.
I can't seem to find examples of why this is happening, or configuration that I can change to fix it.
I've not tested against any other version, so I don't know if it's version specific.
I can only assume that it's waiting for the child process to return. I don't see anything in the sample WSGI script that would be stopping it from returning though?
Without a WSGI script being called in a browser apache restarts in ~ 1 second:
After one is called:
or
There is nothing in the error log to suggest any issue. Just the graceful shutdown message then 90 seconds later the normal messages for start up:
Setup:
OL8.10 Conda Python 3.12 Apache/2.4.37
Apache conf changes:
Standard test script hello.wsgi:
Conda