Hey everyone, thanks so much for maintaining Aleph! I've got a quick question. I'm executing a large number of HTTP requests from a single machine by invoking this function:
(defn execute-async [url body callback complete-fn]
(-> (d/chain
(http/post
url
{:body body
:pool pool
:headers {"Content-Type" "application/json"}})
(fn [response]
(.incrementAndGet x)
(complete-fn)))
(d/catch
(fn [error]
(.printStackTrace error)))
(d/finally
(fn [& _]
(callback)))))
I occasionally see this error:
[Finalizer] WARN manifold.deferred - unconsumed deferred in error state, make sure you're using `catch`.
java.lang.NullPointerException: Cannot invoke "manifold.stream.core.IEventSource.take(Object, Object)" because "this.s" is null
Does anyone have thoughts why? Full stack trace in thread.Can body be a manifold.stream or lazy seq here?
And do you have HTTP/2 enabled? (And if so, do you know whether the server you're talking to supports it?)
Hmm, no http 2. Puzzling. 😕 Thanks anyway!
[Finalizer] WARN manifold.deferred - unconsumed deferred in error state, make sure you're using `catch`.
java.lang.NullPointerException: Cannot invoke "manifold.stream.core.IEventSource.take(Object, Object)" because "this.s" is null
at manifold.stream$reduce$fn__22530$this__19942__auto____22534$fn__22535.invoke(stream.clj:738)
at manifold.stream$reduce$fn__22530$this__19942__auto____22534.invoke(stream.clj:737)
at manifold.stream$reduce$fn__22530.invoke(stream.clj:737)
at manifold.deferred$fn__19777$chain_SINGLEQUOTE____19798.invoke(deferred.clj:883)
at manifold.stream$reduce.invokeStatic(stream.clj:733)
at manifold.stream$reduce.invoke(stream.clj:722)
at aleph.http.client_middleware$wrap_exceptions$fn__29219$fn__29266.invoke(client_middleware.clj:281)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1990)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1990)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:671)
at clojure.core$bound_fn_STAR_$fn__5818.doInvoke(core.clj:2020)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at manifold.deferred$fn__19777$chain_SINGLEQUOTE____19798.invoke(deferred.clj:883)
at manifold.deferred$fn__19777$subscribe__19778$fn__19783.invoke(deferred.clj:849)
at manifold.deferred.Listener.onSuccess(deferred.clj:345)
at manifold.deferred.Deferred$fn__19655$fn__19656.invoke(deferred.clj:524)
at clojure.lang.AFn.run(AFn.java:22)
at io.aleph.dirigiste.Executor$3.run(Executor.java:325)
at io.aleph.dirigiste.Executor$Worker$1.run(Executor.java:61)
at manifold.executor$thread_factory$reify__18716$f__18717.invoke(executor.clj:71)
at clojure.lang.AFn.run(AFn.java:22)
at java.base/java.lang.Thread.run(Thread.java:1583)I'm on 0.8.1.