appsembler / configuration

a simple, but flexible, way for anyone to stand up an instance of the edX platform that is fully configured and ready-to-go
GNU Affero General Public License v3.0
15 stars 13 forks source link

set default max requests #299

Closed thraxil closed 4 years ago

thraxil commented 4 years ago

Cherry picks the commit from #295 back to our ficus branch.


Since we've now encountered memory/resource leak problems a few times that have been fixed by setting the max_requests for gunicorn and have not seen any negative effects, set a reasonable default for the value.

With it unset, it defaults to 0, which gunicorn interprets as "never restart workers" and if a server gets enough traffic or runs long enough can eventually cause memory or resource leak problems.

Tahoe, OU Ginkgo, and now PSU have been running with it set to 1000 for a while now (more than a year in Tahoe's case) and we haven't seen any problems as a result, so this should be a reasonable default value. And of course, it can still be overridden in server-vars.yml if we ever need that.