Created
January 13, 2021 08:16
-
-
Save gannebamm/02289155c79f935b01efd355ee19d630 to your computer and use it in GitHub Desktop.
UWSGI service does not start (fails and restarts)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description="GeoNode UWSGI Service" | |
[Service] | |
User=tisdex | |
Group=www-data | |
# The configuration file application.properties should be here: | |
#change this to your workspace | |
WorkingDirectory=/opt/geonode | |
#path to executable. | |
#executable is a bash script which calls jar file | |
ExecStart=/opt/geonode/geonode-uwsgi.sh | |
#ExecStart=/home/tisdex/.virtualenvs/geonode/bin/uwsgi -c /etc/uwsgi/apps-enabled/geonode.ini | |
SuccessExitStatus=143 | |
TimeoutStopSec=10 | |
Restart=on-failure | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[uwsgi] | |
uwsgi-socket = 0.0.0.0:8000 | |
# http-socket = 0.0.0.0:8000 | |
#chmod-socket = 664 | |
uid = tisdex | |
gid = www-data | |
#plugins = python3 | |
virtualenv = /home/tisdex/.virtualenvs/geonode | |
env = DEBUG=False | |
env = DJANGO_SETTINGS_MODULE=geonode.local_settings | |
env = SECRET_KEY='awesomestring' | |
env = SITE_HOST_NAME=tisdex.thuenen.de | |
env = SITEURL=https://tisdex.thuenen.de/ | |
env = ALLOWED_HOSTS=['tisdex.thuenen.de','*'] | |
env = LOCKDOWN_GEONODE=False | |
env = SESSION_EXPIRED_CONTROL_ENABLED=True | |
env = MONITORING_ENABLED=False | |
env = ADMIN_USERNAME=admin | |
env = ADMIN_PASSWORD=admin | |
env = [email protected] | |
env = GEOSERVER_PUBLIC_HOST=tisdex.thuenen.de | |
env = GEOSERVER_PUBLIC_PORT= | |
env = GEOSERVER_ADMIN_PASSWORD=geoserver | |
env = GEOSERVER_LOCATION=https://tisdex.thuenen.de/geoserver/ | |
env = GEOSERVER_PUBLIC_LOCATION=https://tisdex.thuenen.de/geoserver/ | |
env = GEOSERVER_WEB_UI_LOCATION=https://tisdex.thuenen.de/geoserver/ | |
env = OGC_REQUEST_TIMEOUT=60 | |
env = OGC_REQUEST_MAX_RETRIES=3 | |
env = OGC_REQUEST_POOL_MAXSIZE=100 | |
env = OGC_REQUEST_POOL_CONNECTIONS=100 | |
env = SECURE_SSL_REDIRECT=True | |
env = SECURE_HSTS_INCLUDE_SUBDOMAINS=True | |
env = AVATAR_GRAVATAR_SSL=True | |
logto = /opt/data/logs/geonode.log | |
#pidfile = /opt/data/geonode.pid | |
chdir = /opt/geonode | |
module = geonode.wsgi:application | |
strict = false | |
master = true | |
enable-threads = true | |
vacuum = true ; Delete sockets during shutdown | |
single-interpreter = true | |
die-on-term = true ; Shutdown when receiving SIGTERM (default is respawn) | |
need-app = true | |
# logging | |
# path to where uwsgi logs will be saved | |
# logto = /opt/data/geonode_logs/geonode.log | |
daemonize = /opt/data/logs/geonode.log | |
touch-reload = /opt/geonode/geonode/wsgi.py | |
buffer-size = 32768 | |
harakiri = 60 ; forcefully kill workers after 60 seconds | |
py-callos-afterfork = true ; allow workers to trap signals | |
max-requests = 1000 ; Restart workers after this many requests | |
max-worker-lifetime = 3600 ; Restart workers after this many seconds | |
reload-on-rss = 2048 ; Restart workers after this much resident memory | |
worker-reload-mercy = 60 ; How long to wait before forcefully killing workers | |
cheaper-algo = busyness | |
processes = 128 ; Maximum number of workers allowed | |
cheaper = 8 ; Minimum number of workers allowed | |
cheaper-initial = 16 ; Workers created at startup | |
cheaper-overload = 1 ; Length of a cycle in seconds | |
cheaper-step = 16 ; How many workers to spawn at a time | |
cheaper-busyness-multiplier = 30 ; How many cycles to wait before killing workers | |
cheaper-busyness-min = 20 ; Below this threshold, kill workers (if stable for multiplier cycles) | |
cheaper-busyness-max = 70 ; Above this threshold, spawn new workers | |
cheaper-busyness-backlog-alert = 16 ; Spawn emergency workers if more than this many requests are waiting in the queue | |
cheaper-busyness-backlog-step = 2 ; How many emergency workers to create if there are too many requests in the queue | |
# daemonize = /var/log/uwsgi/geonode.log | |
# cron = -1 -1 -1 -1 -1 /usr/local/bin/python /usr/src/{{project_name}}/manage.py collect_metrics -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment