aleph

stijn 2017-02-20T08:41:02.000139Z

does anyone know what might be the reason for:

stijn 2017-02-20T08:41:04.000140Z

2017-02-20T08:40:28.953+0000 cantona-api-383746225-whp97 ERROR [aleph.http.server:0] - error in HTTP handler
                               java.lang.Thread.run    Thread.java: 745
                                                ...
           manifold.executor/thread-factory/reify/f   executor.clj:  44
           io.aleph.dirigiste.Executor$Worker$1.run  Executor.java:  62
                                                ...
      aleph.http.server/handle-request/fn/f--auto--     server.clj: 156
                        bidi.vhosts/make-handler/fn     vhosts.clj: 199
                                     bidi.ring/fn/G       ring.clj:  12
                                       yada.bidi/fn       bidi.clj:  75
                        yada.handler/handle-request    handler.clj: 169
yada.handler/handle-request-with-maybe-subresources    handler.clj: 120
                                 clojure.core/apply       core.clj: 648
                                                ...
                            manifold.deferred/chain   deferred.clj: 909
                            manifold.deferred/chain   deferred.clj: 933
                                                ...
                                 clojure.core/apply       core.clj: 641
                                 clojure.core/apply       core.clj: 654
                                                ...
                        manifold.deferred/fn/chain-   deferred.clj: 888
              manifold.deferred.Deferred/onRealized   deferred.clj: 417
                    manifold.deferred/add-listener!   deferred.clj: 262
             manifold.deferred.Deferred/addListener   deferred.clj: 384
                io.aleph.dirigiste.Executor.execute  Executor.java: 332
java.util.concurrent.RejectedExecutionException:

dm3 2017-02-20T08:41:52.000141Z

your thread pool doesn’t accept new tasks

dm3 2017-02-20T08:42:06.000142Z

it’s full

stijn 2017-02-20T08:46:23.000143Z

ok, I should probably setup a stats logger

stijn 2017-02-20T08:46:51.000144Z

it started happening when the server was under heavy load, but it doesn't 'repair' itself when the load lowers

stijn 2017-02-20T08:47:07.000145Z

I'm using the default executor

dm3 2017-02-20T08:48:17.000146Z

hm

dm3 2017-02-20T08:49:58.000147Z

I’m not sure what’s the default in your stack but the default Manifold execute-pool allows an Integer/MAX_VALUE number of threads

dm3 2017-02-20T08:50:37.000148Z

so either the pool you’re using has lower limits, or something was hogging resources for a long time

dm3 2017-02-20T08:51:22.000149Z

also I’m not sure what’s the behaviour in case the pool can’t create a new Thread - can this only happen due to OOM - then an OOM would’ve been thrown I think

dm3 2017-02-20T08:55:27.000150Z

also might have happened if the executor was in process of being shut down

dm3 2017-02-20T08:55:38.000151Z

@stijn could that be the case?

dm3 2017-02-20T08:57:31.000152Z

I’d bet you got this exception during the shutdown process

stijn 2017-02-20T08:58:10.000153Z

I will scan the logs to try and find the root cause

stijn 2017-02-20T08:58:31.000154Z

it might be that resources were exhausted

residentsummer 2017-02-20T09:18:50.000155Z

well, I’ve seen this too. Do you, by chance, make requests to other services with aleph.http?

stijn 2017-02-20T09:33:10.000156Z

no, we've deliberately swapped this out for http-kit because of https://github.com/ztellman/aleph/issues/217

residentsummer 2017-02-20T09:37:01.000158Z

Yes, that what I had in mind