--reload not working using systemd service in versions 0.14.x
See original GitHub issueLatest working version was hypercorn==0.13.2. Tested both 0.14.0 and 0.14.1. OS is Ubuntu 20.04.4 LTS.
My service config having working --reload with version 0.13.2: /etc/systemd/system/hypercorn-myservice_v1@dev.service
[Unit]
Description=%N daemon
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
RuntimeDirectory=%i/%p
User=myuser
Group=mygroup
UMask=117
WorkingDirectory=/srv/fastapi/%i/myservice
ExecStart=/srv/fastapi/%i/myservice/venv/bin/hypercorn \
--pid %t/%i/%p/pid \
--bind unix:%t/%i/%p/socket \
--workers 1 \
--root-path "/myservice/v1" \
--reload \
app.v1.main:app
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true
Restart=always
[Install]
WantedBy=multi-user.target
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Add Vector config validation to systemd service #7256 - GitHub
Without config validation, it is not obvious when Vector was failed to start or reload because of configuration errors. For example, start: ~# ......
Read more >How I can "start" if service is not running, but "reload" if it is ...
The command to reload or start a systemd service is systemctl. You can try sudo systemctl reload-or-restart myserver.service.
Read more >How To Use Systemctl to Manage Systemd Services and Units
Restarting and Reloading. To restart a running service, you can use the restart command: sudo systemctl restart application .service.
Read more >systemd.service - Freedesktop.org
Description¶. A unit configuration file whose name ends in " .service " encodes information about a process controlled and supervised by systemd.
Read more >systemd apparently not finding .service file - Stack Overflow
For people from Google: Validate with sudo systemd-analyze verify NAME.service; When using a symlink, make sure it uses absolute path ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Should be fixed in a5bf3caac600dedf2350bdd62f2e5ec92bc6dbc0
@teemu77 that is exactly the same issue I am experiencing as of upgrading from 0.13.X to 0.14.1.