Jetty max threads error when enabling ping /health


#1

Hello, I’m running datomic pro within a Kubernetes cluster and I wanted to set up a liveness probe using the /health HTTP endpoint described here :

java.lang.RuntimeException: Unable to start ping endpoint localhost:9999
at datomic.transactor_ext$start_ping_endpoint.invokeStatic(transactor_ext.clj:56)
at datomic.transactor_ext$start_ping_endpoint.invoke(transactor_ext.clj:39)
at datomic.transactor_ext$start_pro.invokeStatic(transactor_ext.clj:63)
at datomic.transactor_ext$start_pro.invoke(transactor_ext.clj:59)
at clojure.lang.Var.invoke(Var.java:381)
at datomic.transactor$run_STAR_.invokeStatic(transactor.clj:303)
at datomic.transactor$run_STAR_.invoke(transactor.clj:234)
at datomic.transactor$run$fn__26995.invoke(transactor.clj:358)
at clojure.core$binding_conveyor_fn$fn__5476.invoke(core.clj:2022)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Insufficient threads: max=3 < needed(acceptors=1 + selectors=2 + request=1)
at org.eclipse.jetty.server.Server.doStart(Server.java:368)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at cognitect.http_endpoint.jetty$start.invokeStatic(jetty.clj:123)
at cognitect.http_endpoint.jetty$start.invoke(jetty.clj:120)
at cognitect.http_endpoint.jetty$server$fn__9606.invoke(jetty.clj:136)
at cognitect.http_endpoint$create_endpoint.invokeStatic(http_endpoint.clj:306)
at cognitect.http_endpoint$create_endpoint.invoke(http_endpoint.clj:231)
at cognitect.nano_impl.server$create.invokeStatic(server.clj:221)
at cognitect.nano_impl.server$create.invoke(server.clj:187)
at cognitect.nano_impl$create.invokeStatic(nano_impl.clj:228)
at cognitect.nano_impl$create.invoke(nano_impl.clj:152)
at datomic.transactor_ext$start_ping_endpoint.invokeStatic(transactor_ext.clj:47)

But I’m getting this exception and I can’t seem to find a workaround (system property, environment variable etc. in order to tune the Jetty thread pool)

I’m running the latest version of datomic-pro 0.9.5703. Any suggestions on how I should proceed? Thanks in advance