Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to gunicorn and use older binaries #21

Merged
merged 1 commit into from
Mar 27, 2021
Merged

Switch to gunicorn and use older binaries #21

merged 1 commit into from
Mar 27, 2021

Conversation

yanokwa
Copy link
Member

@yanokwa yanokwa commented Mar 27, 2021

Fixes #19.

The switch to Gunicorn is purely because it supports max-requests (killing a worker after finishing) so we don't have to deal with the leaks in pyxform/Validate. Related: getodk/xlsform-server#22.

waitress defaults to 4 workers. Here we default to 5 based on the 2*CPUs+1 recommendation. max-requests is 1 because we really want to make sure to solve the memory leak. We add some jitter to all workers from restarting at once.

Timeout is increased to 600. We've done that on xlsform-online and it seems to work OK.

The switch to OpenJDK 1.8 is because it's smaller than OpenJDK 11. That's an assumption, I haven't actually checked. 1.8 is the minimum that JavaROSA supports.

The same "older versions are smaller" is why I've reverted to Python 3.6. It gets deprecated at the end of 2021, but it's fine for now.

@yanokwa yanokwa merged commit a2536d2 into master Mar 27, 2021
@yanokwa yanokwa deleted the gunicorn branch March 27, 2021 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find and fix memory leak
1 participant