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.

Process restarts often when using systemd service.

See original GitHub issue

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

github_iconTop GitHub Comments

2reactions
massimocandelacommented, Aug 16, 2022

note process memory usage at about 10m uptime, host has 1GB ram

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 set enableAdvancedRpkiStats 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 😃

1reaction
netstxcommented, Aug 17, 2022

Appreciate your thorough responses! Definitely understand your points.

Could you try with enableAdvancedRpkiStats enabled? If you are dedicating the VM to BGPalerter, and there are no other processes using serious memory, you should be able to run it.

Yes, no problem, I’ll report back.

Read more comments on GitHub >

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

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