I have a mysql + django + uwsgi + nginx application and I recently had some issues with uwsgi's default configuration so I want to reconfigure it but I have no idea what the recommended values are.
Another problem is that I couldn't find the default settings that uwsgi uses and that makes debugging really hard.
Using the default configuration, the site was too slow under real traffic (too many requests stuck waiting for the uwsgi socket). So I used a configuration from some tutorial and it had cpu-affinity=1
and processes=4
which fixed the issue. The configuration also had limit-as=512
and now the app gets MemoryErrors so I guess 512MB is not enough.
My questions are:
How can I tell what the recommended settings are? I don't need it to be super perfect, just to handle the traffic in a descent way and to not crash from memory errors etc. Specifically the recommended value for
limit-as
is what I need most right now.What are the default values of uwsgi's settings?
Thanks!
uwsgi --help|grep default
gives a good clue. But honestly, uwsgi's defaults are quite sane. Focus on what is generating a problem and adjust that, like @renzop is saying. – Illiterate