Report this

What is the reason for this report?

Setting up systemctl for uwsgi

Posted on January 30, 2017

Trying to setup uwsgi with systemctl getting this issue

ubuntu@ip-172-31-16-133:~$ sudo systemctl status emperor.uwsgi.service
	● emperor.uwsgi.service - uWSGI Emperor
	   Loaded: loaded (/etc/systemd/system/emperor.uwsgi.service; disabled; vendor preset: enabled)
	   Active: inactive (dead)

	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: Stopped uWSGI Emperor.
	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: Starting uWSGI Emperor...
	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: emperor.uwsgi.service: Main process exited, code=exited
	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: Failed to start uWSGI Emperor.
	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: emperor.uwsgi.service: Unit entered failed state.
	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: emperor.uwsgi.service: Failed with result 'exit-code'.
	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: emperor.uwsgi.service: Service hold-off time over, sche
	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: Stopped uWSGI Emperor.
	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: emperor.uwsgi.service: Start request repeated too quick
	Jan 30 11:16:05 ip-172-31-16-133 systemd[1]: Failed to start uWSGI Emperor.

I’ve Setup uwsgi service as /etc/systemd/system/emperor.uwsgi.service

       [Unit]
	Description=uWSGI Emperor
	After=syslog.target

	[Service]
	ExecStart=/root/uwsgi/uwsgi --ini /etc/uwsgi/emperor.ini
	# Requires systemd version 211 or newer
	RuntimeDirectory=uwsgi
	Restart=always
	KillSignal=SIGQUIT
	Type=notify
	StandardError=syslog
	NotifyAccess=all

	[Install]
	WantedBy=multi-user.target


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

In case that anyone comes across this in the future, here is a step by step tutorial on how to set that up:

https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.