Giter Club home page Giter Club logo

Comments (6)

fvbock avatar fvbock commented on July 3, 2024

for init and friends we'd need a pidfile... should be easy to add as an option.

i am not sure what you mean by reporting, but monitoring/crash recovery would be outside the scope of this library ... but i guess your point is that you'd need to be able to use init/systemd etc. in order to take care of that right?

would adding a pidfile option solve your problems or do you need something else?

from endless.

jpillora avatar jpillora commented on July 3, 2024

Sorry, abit slow with the reply. I'm in the planning phase of an app which needs to be continuously deployed and it would be nice to have it managed by init/systemd. I've always run programs in the foreground when under a process manager, though now I look into it there's a forking process type in systemd, which uses pidfiles so yes, at this point, it looks like a pidfile option is that would be required

from endless.

importnil avatar importnil commented on July 3, 2024

@jpillora please can you provide an example of your systemd service unit file? I want to use endless with systemd as well, and something like systemd restart goapp doesn't currently do graceful restart for my app...

from endless.

fzerorubigd avatar fzerorubigd commented on July 3, 2024

systemd forking can not handle multiple restart.

for the first time, systemd wait for the first fork (you should fork once! it has some workaround, simply send yourself a HUP or something similar) but the next time (when you send a signal for a child process) then systemd mark the process as dead.

For that sort of things, I use https://github.com/amscanne/huptime .

from endless.

spaiz avatar spaiz commented on July 3, 2024

Hi. Any updates? Is there any working way to use endless's graceful restarts with systemd?

from endless.

jpillora avatar jpillora commented on July 3, 2024

I ended up resolving this by writing a new Go package https://github.com/jpillora/overseer

from endless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.