Graceful shutdown of embedded jetty

170 views
Skip to first unread message

Robert Sjödahl

unread,
Sep 7, 2018, 8:18:32 AM9/7/18
to Restlet Framework (Discuss)
Hi,

I have Restlet 2.3.12 setup with embedded jetty today. I want to have a graceful shutdown. That means that I would like to first send SIGTERM (i.e. kill) and then after a grace period send SIGKILL (i.e. kill -9). On the SIGTERM I want to stop accepting connections and only start handling the current connections. And at SIGKILL kill the application in total. Today from my tests SIGTERM will just kill the application.

I guess this can be down by adding a shutdown hook from Java and invoking a method on the wrapped server? 

But what is the preferred way to do this with Restlet and embedded Jetty?

Regards,
/Robert

Robert Sjödahl

unread,
Nov 14, 2018, 3:49:38 AM11/14/18
to Restlet Framework (Discuss)
Hi,

After Restlet 2.4.1 Jetty has been updated to 9.4.x which is to support graceful shutdown. But there is an issue with that in restlet:

Does anyone have a workaround for this?

Regards,
/Robert
Reply all
Reply to author
Forward
0 new messages