-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core:error] [pid 73214] [client ipaddress:62824] Script timed out before returning headers: myapp.wsgi #880
Comments
It is possibly because you are not forcing the use of the main Python interpreter context by using Various third party Python packages will not work in Python sub interpreters. This includes very popular packages such as There is additional details as to why in: In short though, your application code could be deadlocking due to the problems with those third party packages and so the request never returns. You also seem to be missing the correct directives to have your application run in daemon mode as well. Can you ensure that you provide a more complete copy of the mod_wsgi configuration you are using so I can review it? At least try with:
|
Thank you very much for your suggestion. I've already implemented the configuration as you recommended. Below are the detailed .conf file configurations I'm currently using:
Could you please let me know if you see any issues with these configurations? Thank you. |
You should not need to add Add:
outside of all |
Hi everyone,
I'm currently trying to deploy a Flask application on an Apache/2.4.6 server running on CentOS, and I've encountered a problem. Despite following all the necessary steps for deployment, whenever I try to access the app through its URL, I receive an error message stating: "Script timed out before returning headers: myapp.wsgi".
Here's a brief overview of my setup:
Virtual Environment Location: My Python virtual environment is located at /var/www/html/flaskapps/myapp/venv.
Apache Configuration: In my Apache .conf file, I've set up the following directives:
WSGI File Content:
In my myapp.wsgi file, I've included the Python path to my application and the site-packages directory inside the virtual environment. Additionally, I've attempted to activate the virtual environment by executing the activate_this.py script. Here is the content of myapp.wsgi:
I have double-checked all the paths specified in the .conf file, and they appear to be correct. However, I'm still facing the timeout issue when trying to access the application.
Also, I went through the documentation: https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html to find out the solution for the issue.
Has anyone faced a similar issue or have any suggestions on what might be going wrong? Any advice or guidance would be greatly appreciated.
Thank you!
The text was updated successfully, but these errors were encountered: