rknell / alfred

A performant, expressjs like server framework with a few gadgets that make life even easier.
Other
526 stars 29 forks source link

Alfred restart every 8 hours without request #119

Closed ChristophKe closed 1 year ago

ChristophKe commented 1 year ago

I have an Alfred-Server running on a linux-system using a Systemd-Unit to start. Looking into my Log-Files I can see that if there is no request for 8 hours, the Server is restarted. Without a request this happens every 8 hours again and again. If there are requests it happens 8 hours after the last of them. No Error is reported, it is just restarting. Is there any build in timeout in alfred that stops the server after an idle time (causing Systemd to restart it)? Do you have any other idea why this might happen?

Best regards, Christoph

rknell commented 1 year ago

There is absolutely nothing in alfred that would restart it - it should just keep on going. Also I can't think of anything that would have the timer with the stack you outlined. Are you using any keep alive type script such as pm2 etc or nginx in front of alfred?

Honestly at a bit of a loss as to why its happening but not disputing it does.

If anyone else can weight in on this would be happy to hear it!

ChristophKe commented 1 year ago

No, we aren't using anything like pm2. We have an Apache as reverse proxy, forwarding requests to our two Alfred/Dart Apps. These Apps are started as systemd-units (with restart=always).

After your message I did another test: I started the Alfred-Server on a local windows system and it wasn't restarting there after 8 idle hours. So I think you are totally right, it doesn't seem to be an alfred related behaviour. There must be a misconfiguration on our linux system.

Thank you for your fast reply!!

Christoph