centos 7 systemd : Active: failed (Result: start-limit)
Solution 1
proj.service start request repeated too quickly, refusing to start.
This message is telling you, that you are restarting the service too frequently and systemd
has integrated mechanism to detect it and block before the too many restarts will cause some trouble.
There are options StartLimitInterval=
and StartLimitBurst=
which modifies this behavior. You can read more in manual page.
For this case, just add them in your /etc/systemd/system/mysite.service
under the [Unit]
section.
Solution 2
Type=forking NotifyAccess=main
This is another readiness protocol mismatch. The doco tells you that the program speaks the systemd text-message readiness protocol.
Type=notify NotifyAccess=all
Further reading
- "Systemd". uWSGI 2.0 Docs.
- Jonathan de Boyne Pollard (2015). Readiness protocol problems with Unix dæmons. Frequently Given Answers.
Related videos on Youtube
user2492364
Updated on September 18, 2022Comments
-
user2492364 over 1 year
I want to use uwsgi with my django project
I testusgi --ini uwsgi.ini
works wellAnd I want to write in
systemd
to control it
And face errorHere is my file
/etc/systemd/system/mysite.service
[Unit] Description=uWSGI for proj After=syslog.target [Service] Restart=always ExecStart=/usr/bin/uwsgi --ini /usr/share/nginx/ENV/proj/proj/uwsgi.ini StandardError=syslog KillSignal=SIGQUIT Type=forking NotifyAccess=main [Install] WantedBy=multi-user.target
first time I use
systemctl restart mysite.service
it works well ,and then I usesystemctl stop mysite.service
and then restart again withsystemctl restart mysite.service
But it can't restart after stop it
I got error :proj.service - uWSGI for proj Loaded: loaded (/usr/lib/systemd/system/proj.service; disabled) Active: failed (Result: start-limit) since Fri 2015-11-13 13:40:35 CST; 887ms ago Process: 4297 ExecStart=/usr/bin/uwsgi --ini /usr/share/nginx/ENV/proj/proj/uwsgi.ini (code=exited, status=0/SUCCESS) Main PID: 4298 (code=exited, status=0/SUCCESS) Nov 13 13:40:35 localhost.localdomain systemd[1]: proj.service holdoff time over, scheduling restart. Nov 13 13:40:35 localhost.localdomain systemd[1]: Stopping uWSGI for proj... Nov 13 13:40:35 localhost.localdomain systemd[1]: Starting uWSGI for proj... Nov 13 13:40:35 localhost.localdomain systemd[1]: proj.service start request repeated too quickly, refusing to start. Nov 13 13:40:35 localhost.localdomain systemd[1]: Failed to start uWSGI for proj. Nov 13 13:40:35 localhost.localdomain systemd[1]: Unit proj.service entered failed state. [root@localhost ~]# vim /lib/systemd/system/proj.service
Please help me
Thanks
-
Shailen about 6 yearsTo improve on this answer, how doI set those options? (This could help others on the "TLDR;" manual page)