I see many of the uWSGI configs posted here and the ones I came across for existing applications at work also have max-requests populated with values from 100's to 1000's.
What is the purpose of recycling your processes after a set number of requests? Are you trying to avoid memory leaks, forcing your application to handle resets gracefully?
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. You can also start more processes (with the --processes option), each will have its own pool of async cores.
uWSGI supports several methods of integrating with web servers. It is also capable of serving HTTP requests by itself. WSGI is just an interface specification, in simple terms, it tells you what methods should be implemented for passing requests and responses between the server and the application.
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.
You can dynamically tune or configure various aspects of the uWSGI server using special variables passed by the web server (or in general by a uwsgi compliant client). For Nginx, the uwsgi_param <name> <value>; directive is used. For Apache, the SetEnv <name> <value> directive is used.
Yes, avoiding memory leak is one of the main reason of setting max request. There is also another parameter named harakiri which helps server get rid of bad application, locking the resources.
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