question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--reload not working using systemd service in versions 0.14.x

See original GitHub issue

Latest 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:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pgjonescommented, Sep 3, 2022

Should be fixed in a5bf3caac600dedf2350bdd62f2e5ec92bc6dbc0

0reactions
artur-ciesielskicommented, Sep 2, 2022

@teemu77 that is exactly the same issue I am experiencing as of upgrading from 0.13.X to 0.14.1.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found