Hi, On Thu, Oct 12, 2023 at 10:26 AM Matthias Pfau via jetty-users <jetty-users@eclipse.org> wrote: > > Hey, > we use a single instance of an HttpClient and inject it in various places. > > Since a couple days, HttpClient is stopped on our production system after it > is in use for a couple hours. This has never happened before and we don't > invoke HttpClient#stop from our codebase. > > After it was stopped, each attempt to issue a request leads to the following > exception > java.util.concurrent.RejectedExecutionException: HttpClient@6b357eb6{STOPPED} > is stopped at > org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:337) > at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:304) > at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:544) > > Unfortunately, we can't find any trace of what caused stopping the HttpClient > in our logs. Is there a simple way find the stack that lead to the > HttpClient#stop invocation?
Use this: https://eclipse.dev/jetty/documentation/jetty-12/programming-guide/index.html#pg-arch-bean-listener-lifecycle Add the listener to HttpClient (not Server as in the example), and in the listener you can create/throw/log an exception so you will have the stack trace of what code is calling stop(). Let us know if it worked and what was it (may be useful to others). -- Simone Bordet ---- http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. _______________________________________________ jetty-users mailing list jetty-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users