I am trying to be careful and understand every setting in my nginx configuration. I have seen a configuration example that has something like:
workers = 8 processes = 10
But the uWSGI docs do not seem to differentiate. Are they synonyms? If so, does that make this configuration incorrect?
The threads option is used to tell uWSGI to start our application in prethreaded mode. That essentially means it is launching the application across multiple threads, making our four processes essentially eight processes.
This configuration will tell uWSGI to run up to 10 workers under load. If the app is idle uWSGI will stop workers but it will always leave at least 2 of them running. With cheaper-initial you can control how many workers should be spawned at startup.
Running uWSGI in Async mode Each async core can manage a request, so with this setup you can accept 10 concurrent requests with only one process.
harakiri. A feature of uWSGI that aborts workers that are serving requests for an excessively long time. Configured using the harakiri family of options. Every request that will take longer than the seconds specified in the harakiri timeout will be dropped and the corresponding worker recycled.
workers
and processes
are indeed synonyms and the same thing. (I'm sure you've seen the configuration option documentation for them both)
That configuration is very incorrect and could actually have no effect as a result. (I just found out that by having the cheaper
option twice in one of my ini
files neither was being picked up - but I don't know if this is the case with workers/processes).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With