Process restarts often when using systemd service.
See original GitHub issueI am not sure if this is expected behavior, so figured I’d open an issue.
Description When running as a service with systemd, the bgpalerter process will restart on its own every ~10 minutes.
Systemd service config and log example
[Unit]
Description=BGPalerter
After=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=30s
User=bgpalerter
WorkingDirectory=/home/bgpalerter
ExecStart=/home/bgpalerter/bgpalerter-linux-x64
[Install]
WantedBy=multi-user.target
2022-08-15T18:01:10-05:00 info: ris connector connected (instance:6e16e20e-8c05-4830-9a57-7c37812f2bf7 connection:86cdbd2f-9b19-47e6-944c-1df3fe1c4943)
2022-08-15T18:01:10-05:00 info: Subscribed to monitored resources
2022-08-15T18:01:10-05:00 info: Subscribed to beacons
2022-08-15T18:11:55-05:00 info: ris connector connected (instance:71bd9ed3-3168-445d-98cc-59f5339a3bfb connection:414a9d8c-db8a-4257-af7a-6c2303632fc2)
2022-08-15T18:11:55-05:00 info: Subscribed to monitored resources
2022-08-15T18:11:55-05:00 info: Subscribed to beacons
2022-08-15T18:22:37-05:00 info: ris connector connected (instance:0615ac35-9864-4143-9e45-074e67f6db5e connection:a3006ae3-2473-4f35-8d0c-398e5ff23447)
2022-08-15T18:22:37-05:00 info: Subscribed to monitored resources
2022-08-15T18:22:37-05:00 info: Subscribed to beacons
Expected behavior Process to remain running unless stopped.
Are you using the binary or the source code? linux x64 binary on Debian 11
Your information AS62943
Issue Analytics
- State:
- Created a year ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Systemd: Service restarts every 90 seconds
The service script restarts every 90 seconds on a consistent basis. If we disable the service and run the executable, it runs as...
Read more >systemd service automatic restart after StartLimitInterval
To have a service restart 3 times at 90 second intervals include the following lines in your systemd service file:
Read more >Set up self-healing services with systemd | Enable Sysadmin
Restart failed units. Systemd makes it very easy to restart a unit when it fails. Sometimes, this is all you really need. I...
Read more >systemd keeps stopping and restarting a service - Super User
It seems the Type=forking was causing the restarts. A better way was to remove the Type and use PIDFile= instead.
Read more >Configure a Systemd Service to Restart Periodically - Baeldung
In this tutorial, we'll look at three ways in which we can restart a systemd service periodically. 2. Using a Oneshot Service.
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
I may have skipped this! 1Gb ram is not enough. Possibly you have in the system 500Mb free, the old version of BGPalerter required 1~1.2Gb, the new one requires 1.5Gb when
enableAdvancedRpkiStats
is true. So I would install it on a 4Gb vm. If you setenableAdvancedRpkiStats
to false, with some swap it will work with 1Gb.It’s a good topic tho, I need to write some requirements on the main page 😃
Appreciate your thorough responses! Definitely understand your points.
Yes, no problem, I’ll report back.