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

Improve nav configuration for 2020 #254

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ansible/playbooks/roles/maps-tileserver/files/c3nav-tiles.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module = c3nav.tileserver.wsgi

master = true
processes = 5
enable-threads = True
ignore-sigpipe = True

socket = /var/run/c3nav/tiles.sock
vacuum = true
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/roles/maps/files/c3nav-gunicorn.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=network.target
User=c3nav
Group=c3nav
WorkingDirectory=/opt/c3nav/src
ExecStart=/opt/c3nav/env/bin/gunicorn --workers 8 --bind unix:/var/run/c3nav/gunicorn-c3nav.sock c3nav.wsgi:application --log-level warning --error-logfile /var/log/c3nav/gunicorn.log --access-logfile /dev/null
ExecStart=/opt/c3nav/env/bin/gunicorn --workers 4 --bind unix:/var/run/c3nav/gunicorn-c3nav.sock c3nav.wsgi:application --log-level warning --error-logfile /var/log/c3nav/gunicorn.log --access-logfile /dev/null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to do something like {{ ansible_processor_vcpus }} to make the workers match the number of CPUs on the system. Even with threads, you're likely to be limited to the GIL as a worker CPU limit.


[Install]
WantedBy=multi-user.target