systemd initiated uwsgi process shuts down after a while
Posted
by
Calvin Cheng
on Server Fault
See other posts from Server Fault
or by Calvin Cheng
Published on 2012-12-18T03:39:21Z
Indexed on
2012/12/18
5:04 UTC
Read the original article
Hit count: 539
So I wrote this simple systemd service script:-
[Unit]
Description=uwsgi server script
[Service]
User=web
Group=web
WorkingDirectory=/var/www/prod/myproject/releases/current
ExecStart=/bin/bash -c 'source ~/.bash_profile; workon myproject; uwsgi --ini /var/www/prod/myproject/releases/current/myproject/uwsgi_prod.ini'
[Install]
WantedBy=multi-user.target
which works fine - it starts up and I can see my uwsgi processes in htop
.
However, it inexplicably shuts down after being idle for 5 minutes.
If I start this process manually in bash console by executing, as web user:-
source ~/.bash_profile
workon myproject
uwsgi --ini /var/www/prod/myproject/releases/current/myproject/uwsgi_prod.ini
my process does not die after being idle.
What could the problem be?
© Server Fault or respective owner