Metaculus / Metaculus/metaculus
Gunicorn workers auto-restart 502 nginx
@hlbmtc is already working on this.
Since Sep 1, 2025.
- Dominant language
- TypeScript
- Stars
- 113
- Forks
- 34
- Avg merge
- 16h 34m
- Merged PRs (30d)
- 30
Description
All these 502 errors are related to this PR, which introduced auto-restarting of Gunicorn workers every 1.5k requests. I had expected this to be good practice — to periodically free up allocated resources and guard against potential memory leaks — but it’s not working as I hoped.
I assumed Gunicorn would re-route traffic to other active workers during a restart so users wouldn’t notice, but it seems like it's actually throwing 502s during the restart window instead.
Investigate how to avoid 502 errors
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.