ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Use a non-Apache WSGI

Open rossjones opened this issue 10 years ago • 9 comments

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.

rossjones avatar Jun 17 '14 11:06 rossjones

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.

maxious avatar Jun 17 '14 12:06 maxious

No code changes required, just documentation really and probably the .deb

rossjones avatar Jun 17 '14 12:06 rossjones

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.

rossjones avatar Jun 26 '14 08:06 rossjones

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.

nigelbabu avatar Jul 04 '14 05:07 nigelbabu

Perhaps gunicorn in the docker container would be the best place to try this out?

rossjones avatar Jul 04 '14 08:07 rossjones

I would definitely +1 a move away from requiring Apache and agree that trying gunicorn stuff in docker would be natural place to start.

rufuspollock avatar Jul 04 '14 08:07 rufuspollock

Any update about this issue? IMHO, in production, is better to use gunicorn.

filhocf avatar Apr 03 '17 17:04 filhocf

As far as I am aware it's still up for grabs if you have the time to try it and document the process.

rossjones avatar Apr 03 '17 17:04 rossjones

Seems available here https://github.com/ckan/ckan/pull/1861/files

Most importantly gunicorns paste parameter:

--paste "$CKAN_CONFIG"/ckan.ini

sorki avatar Jan 13 '18 23:01 sorki