|
First, is there a "recommended" way to set up Gunicorn and Django on Webfaction? Second, what, if any, are things we should be aware of when deploying with Gunicorn on WebFaction (e.g. memory usage, etc...)? Cheers! |
|
Like I have been doing a lot of searching and probing to get this done easily, I might as well share the fabric script I wrote to deploy django/gunicorn. It is git specific, but you can checkout how its done easily from the script itself. https://github.com/ashwoods/webfaction-django-fabfile |
Hi,
There is no recommended way, as such.
I think if you limit the number of processes to 1 or 2 until you see how much RAM it is going to use then you can increase or modify as needed.
Hope that helps!
Yeah that is a good point considering I had my app calculating the cores on the machine and doubling it for the amount of workers... which I think ends up being like 8-16 workers... way too many for 80mb of RAM.
8 - 16 workers would be a bit too much for 80MB of RAM unless your application was really small.
Yeah, I was using something like 256mb or something equally insane. Got my processes shut off automatically :)
With 2 workers, things seem to be running well.
Hi,
Thanks for reporting back what you found! Now we do have a set of best practices for Gunicorn. :)