mirror of
https://github.com/labstack/echo.git
synced 2025-01-10 00:28:23 +02:00
ffdb76efc7
* [doc] adding graceful documentation and example. * adding myself to the maintainers list and minor comment formatting change
862 B
862 B
+++ title = "Graceful Shutdown Recipe" description = "Graceful shutdown recipe / example for Echo" [menu.side] name = "Graceful Shutdown" parent = "recipes" weight = 13 +++
Graceful Shutdown Recipe
Echo now ships with graceful server termination inside it, to accomplish it Echo uses github.com/tylerb/graceful
library.
By Default echo uses 15 seconds as shutdown timeout, giving 15 secs to open connections at the time the server starts to shut-down.
In order to change this default 15 seconds you could change the ShutdownTimeout
property of your Echo instance as needed by doing something like:
server.go
{{< embed "graceful-shutdown/server.go" >}}
Maintainers
Source Code
- [graceful]({{< source "graceful-shutdown/graceful" >}})