ideas
ideas copied to clipboard
Use a non-Apache WSGI
Currently Apache is only used in the setup to provide access via mod_wsgi, but this seems like it is just another piece of software to manage, configure, upgrade and waste resources.
There are plenty of other wsgi containers ( Gunicorn - http://gunicorn.org/ for instance, or uwsgi - https://github.com/unbit/uwsgi-docs ) that can be hooked up directly from nginx.
Perhaps it would be a good time to remote Apache from the default setup and instead use something more suited for the task with nginx peering directly to the wsgi server.
Are there any code changes required to make this work or is it just documentation?
I tried Chaussette (https://github.com/mozilla-services/chaussette with Meinheld backend running via Supervisor) recently and load+latency were better but certain functions like password reset seemed to get thread safe errors.
No code changes required, just documentation really and probably the .deb
I have got a problem with uwsgi wrt the pylons full stack middleware (it isn't delivering error emails). So not failproof, but probably not insurmountable.
We're tied to Apache only because it' the easiest to debug if someone does something wrong. When using Nginx, I usually prefer using uwsgi or gunicorn for python projects.
Perhaps gunicorn in the docker container would be the best place to try this out?
I would definitely +1 a move away from requiring Apache and agree that trying gunicorn stuff in docker would be natural place to start.
Any update about this issue? IMHO, in production, is better to use gunicorn.
As far as I am aware it's still up for grabs if you have the time to try it and document the process.
Seems available here https://github.com/ckan/ckan/pull/1861/files
Most importantly gunicorns paste
parameter:
--paste "$CKAN_CONFIG"/ckan.ini