1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-20 19:52:47 +02:00
echo/website/content/recipes/graceful-shutdown.md
Vishal Rana 054a310e70 updated website
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-20 14:51:17 -08:00

820 B

+++ title = "Graceful Shutdown Example" description = "Graceful shutdown example for Echo" [menu.main] name = "Graceful Shutdown" parent = "recipes" weight = 13 +++

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" >}}

Source Code

  • [graceful]({{< source "graceful-shutdown/graceful" >}})

Maintainers