for unexpected errors it's better to crash so that operators can be notified
bmbouter
that is not always true, in our case we want celery workers to just keep on going if the broker bounces
surabujin has quit
monitoring is another component's responsibility, watching celery run should not be the monitoring point of broker availability
asksol_
right, but you need to map out the errors
bmbouter
agreed, "all errors" should not be treated this way
I'll have to map them for qpid.messaging as a client
asksol_
I'm saying unexpected errors, a broker connection error is not unexpected
bmbouter
oh ok
well then we agree perfectly I think
asksol_
try upgrading to the latest librabbitmq, it's probably fixed
bmbouter
so back to this stack trace with rabbitMQ, Celery observes ""Connection to broker lost Trying to re-establish" and then another ConnectionErorr is raised
ok upgrading now...
asksol_
it would never have been able to recover from this error, so in that case it would just never recover even if the broker does
bmbouter
right because it's an acutual correctness problem you are saying
with librabbitmq
asksol_
it's a programming error in librabbitmq, like a SyntaxError they are not treated as a connection error
bmbouter
right
got it
asksol_
unless the transport adds SyntaxError to the list of recoverable connection errors :)
bmbouter
so how can I have my Qpid transport for kombu indicate the recoverable error set?
hahaha
no no, we're not doing that :-)
asksol_
before it was Transport.connection_errors and Transport.channel_errors
both would cause the connection to be reestablished
anuvrat joined the channel
bmbouter
are those still respected?
you say "before..."
asksol_
now it's recoverable_connection_errrors and recoverable_channel_errors
bmbouter
oh ok
asksol_
they are used if the new ones are not defined
bmbouter
are these used by kombu or celery?
it sounds like celery
because celery is decided if it needs to re-enter or not
asksol_
recoverable_channel_errors will close and recreate the channel, recoverable_connection_errors will reestablish the connection
if you only have connections you can just define the latter
mahmoudimus joined the channel
it's used by both kombu and celery, usually you will not use them directly but use the Connection.ensure and Connection.autoretry wrappers
and some of the operations support the retry argument (like Producer.publish)