-
Notifications
You must be signed in to change notification settings - Fork 15
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
Wrong app initialization in wsgi.py #240
Comments
This bug needs to be fixed in all WPS birds. We can keep the main bug report in flyingpigeon. |
Would be nice to have a common |
@ldperron I have fixed this now in the birds used by PAVICS. Other birds will follow. Still there is a duplication of log entries ... maybe due to the number of gunicorn workers. You can change in addition the log-level maybe just to You can merge or cherry-pick the changes. |
Thanks! We will stay with the workaround for now, but I will make sure to remove the workaround when we upgrade any of the birds. |
Finally, the workaround using --max-requests 1 was a very bad idea. It totally breaks async execution of WPS processes. |
This bug is reported by CRIM:
I recently started working on the PAVICS project, and I have a bug to submit you, but I’m not sure where is the best place/project to submit it.
We have a common bug with the WPS services built on pywps, such as Malleefowl, Flyingpigeon and Hummingbird.
On each WPS request we perform on those services, an additional file descriptor gets opened on the services’ log file, for example, inside the Flyingpigeon Docker container, it’s the file
/opt/birdhouse/var/log/pywps/flyingpigeon.log.
Consequently, all log output gets duplicated by the number of times the gunicorn worker had previously processed requests… filling up our hard drives very rapidly.
My quick workaround is to add “--max-requests 1” to the gunicorn command line, so the workers are restarted after each requests.
But after longer investigation, I found out that the root cause of the problem is in
wsgi.py
of those services.For example, Flyingpigeon is currently written like this:
Unfortunately,
create_app()
is called on every request handled by the worker. Rewriting thewsgi.py
like this fixes the problem:Thanks!
The text was updated successfully, but these errors were encountered: