Closed uaalto closed 7 years ago
Your queue handler is returning an :error
status at some point, which is triggering a logging call, which is malfunctioning for a reason that I can't make out from the info provided here.
Are you using any Timbre middleware?
Could you please try again with [com.taoensso/carmine "2.13.3-uaalto"]
?
Thanks for your reply @ptaoussanis !
Yes, I'm using Timbre too :)
But this error seems to be originated internally, right? The queue handler is indeed returning :error
, which I use to signal that the handler didn't succeed but don't want to retry. Is that the correct use of it?
No problem. Are you using any Timbre middleware? I.e. have you defined any custom middleware functions for Timbre?
Your use looks correct, but we should get better info for debugging with [com.taoensso/carmine "2.13.3-uaalto"]
.
Actually, sorry, I confused two separate projects. In this one I'm not using Timbre.
No problem. To clarify: you don't need to be using Timbre for the suggestion to try [com.taoensso/carmine "2.13.3-uaalto"]
for extra debugging info.
Hi Peter! The issue remains. Here's the latest log:
2016-06-29T11:32:34.013372+00:00 app[worker.1]: 16-06-29 11:32:33 f053c4b1-fbcd-43d5-aee6-cb9128b5603b ERROR [taoensso.carmine.message-queue:202] - Error handling tasks-purchase queue message: c32db1
6a-d985-42c8-8a87-a81318a7a9e3
2016-06-29T11:32:34.013393+00:00 app[worker.1]: java.lang.Thread.run Thread.java: 745
2016-06-29T11:32:34.013394+00:00 app[worker.1]: java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 617
2016-06-29T11:32:34.013394+00:00 app[worker.1]: java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1142
2016-06-29T11:32:34.013395+00:00 app[worker.1]: java.util.concurrent.FutureTask.run FutureTask.java: 266
2016-06-29T11:32:34.013396+00:00 app[worker.1]: ...
2016-06-29T11:32:34.013397+00:00 app[worker.1]: clojure.core/binding-conveyor-fn/fn core.clj: 1938
2016-06-29T11:32:34.013397+00:00 app[worker.1]: taoensso.carmine.message-queue.Worker/fn/fn message_queue.clj: 287
2016-06-29T11:32:34.013398+00:00 app[worker.1]: taoensso.carmine.message-queue.Worker/start-polling-loop! message_queue.clj: 254
2016-06-29T11:32:34.013398+00:00 app[worker.1]: taoensso.carmine.message-queue.Worker/start-polling-loop!/fn message_queue.clj: 273
2016-06-29T11:32:34.013399+00:00 app[worker.1]: taoensso.carmine.message-queue/handle1 message_queue.clj: 224
2016-06-29T11:32:34.013400+00:00 app[worker.1]: taoensso.carmine.message-queue/handle1/error message_queue.clj: 202
2016-06-29T11:32:34.013400+00:00 app[worker.1]: taoensso.timbre/-log! timbre.clj: 365
2016-06-29T11:32:34.013401+00:00 app[worker.1]: clojure.core/deref core.clj: 2228
2016-06-29T11:32:34.013402+00:00 app[worker.1]: ...
2016-06-29T11:32:34.013402+00:00 app[worker.1]: taoensso.carmine.message-queue/handle1/error/fn message_queue.clj: 203
2016-06-29T11:32:34.013403+00:00 app[worker.1]: clojure.core/ex-info core.clj: 4617
2016-06-29T11:32:34.013404+00:00 app[worker.1]: clojure.lang.ExceptionInfo: :error handler response
2016-06-29T11:32:34.013405+00:00 app[worker.1]: attempt: 1
2016-06-29T11:32:34.013405+00:00 app[worker.1]: mcontent: {:idempotency-key "130db567-32f9-41e4-a13d-20a9767b52ab",
REDACTED
}
2016-06-29T11:32:34.013410+00:00 app[worker.1]: mid: "c32db16a-d985-42c8-8a87-a81318a7a9e3"
2016-06-29T11:32:34.013411+00:00 app[worker.1]: qname: "tasks"
Is that the entire stack trace? It's not clear to me what exception's actually being thrown.
I know, is not clear to me either. This is running in Heroku, could it be tampering or limiting the logs? The redacted part contains just a few keys, but they look completely ok.
Just added a line I was missing above! It seems the error is here: https://github.com/ptaoussanis/carmine/blob/master/src/taoensso/carmine/message_queue.clj#L202
I'm not familiar with Heroku or its logging, sorry. Like I say, best I can tell from this info:
:error
status for these messages (normal behaviour)errorf
logging call (normal behaviour)The full stack trace should include info that'd help debug 3, but that doesn't seem to be included here. Not sure if it'd be available elsewhere.
Just have my hands full tonight, but I'll create a debug build for you tomorrow.
More info: the redacted keys are all strings, except one integer.
Something you can try in the meantime that could be helpful:
Please just try a Timbre logging call elsewhere:
(require '[taoensso.timbre :as timbre])
(try
(timbre/errorf "Debug call")
(catch Throwable t t))
If the logging call completes successfully, this'll return nil. If it fails, it'll return the error.
Please get me:
timbre/*config*
Thanks!
Any update on this?
Hi Peter! Sorry, I've been terribly overwhelmed.
I actually changed the code to finish the task as {:status :success}
. It is of course kind of cheating, but it actually makes more sense in my use case.
I can't run test code in the server anymore because we've moved to production, so I had to to do my tests locally.
{:level :debug, :ns-whitelist [], :ns-blacklist [], :middleware [], :timestamp-opts {:pattern "yy-MM-dd HH:mm:ss", :locale :jvm-default, :timezone :utc}, :output-fn #function[taoensso.timbre/default-output-fn], :appenders {:println {:enabled? true, :async? false, :min-level nil, :rate-limit nil, :output-fn :inherit, :fn #function[taoensso.timbre.appenders.core/println-appender/fn--15329]}}}
Hi Ulysses, sorry for the delay replying.
Think the best way of proceeding on this if you're still having problems (?) would be trying to produce some kind of reproducible example that I could look at and debug from my end.
Hi Ulysses, can this issue be closed?
I cannot find a relation of this with our code. Is it possible that is an internal error of Carmine, or looks more like an issue in the handler?