Comments (6)
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.
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.
@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.
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.
Hi. Any updates? Is there any working way to use endless's graceful restarts with systemd?
from endless.
I ended up resolving this by writing a new Go package https://github.com/jpillora/overseer
from endless.
Related Issues (20)
- FD leak on linux after restart HOT 1
- can't this project build in Windows? HOT 6
- systemd init script HOT 3
- can't work with systemd HOT 2
- accept tcp 127.0.0.1:4242: use of closed network connection HOT 3
- endless.NewServer() Struct Variable
- how to use with r.Run(":8080") and r.RunTLS(":8443", "server.pem", "server.key") HOT 1
- Support Http2.0 HOT 1
- add go mod
- fork() should use cmd.Run() rather than cmd.Start() HOT 1
- go build command-line-arguments: copying /tmp/go-build042781492/b001/exe/a.out: open main: text file busy
- net.FileListener error: file file+net : getsockopt: socket operation on non-socket
- POST_SIGNAL shutdown server not run
- I tried to get the app to send a SIGHUP signal to reload itself and got a "text file busy" error
- Build for Windows on compilers smaller than go1.10 HOT 1
- windows endless.go:64:11: undefined: syscall.SIGUSR1 HOT 1
- Abandoned project? HOT 3
- reload daemon then http server can't listen on other port
- can't use go build, show too many errors
- Feature Request: Support Listeners on Unix sockets instead of TCP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from endless.