gin-gonic / gin

Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
https://gin-gonic.com/
MIT License
78.97k stars 8.02k forks source link

GIN shutting down unexpectedly, no error logged #1558

Open juancdelgado opened 6 years ago

juancdelgado commented 6 years ago

I was wondering if there is any issues reported regarding GIN shutting down with no reason. Runs for 3 days to a week with no service hits. then app shutdowns. I got a start up script that runs if the app is down and restarts it

Below shows the log being restarted. Since i only have logging set to WARN and above (production site), i don't have debug logs. If the server is shutting down i should be receiving a PANIC or ERROR log.

admin@linuxmachine:/dir $ cat service.log
time="2018-09-10T18:41:42-05:00" level=info Log Compress=true Log Level=warn Log Location=/u/log/ Log Max Backups=15 Log Max size=5 Log enabled=true logFileName=service.log
time="2018-09-16T03:08:42-05:00" level=info Log Compress=true Log Level=warn Log Location=/u/log/  Log Max Backups=15 Log Max size=5 Log enabled=true logFileName=service.log
time="2018-09-16T03:15:42-05:00" level=info Log Compress=true Log Level=warn Log Location=/u/log/  Log Max Backups=15 Log Max size=5 Log enabled=true logFileName=service.log
admin@linuxmachine:/dir $
thinkerou commented 6 years ago

Hi @PopperJuan please see the example https://github.com/gin-gonic/gin/tree/master/examples/graceful-shutdown