while($channel->is_open()) issues after previously large batch #1107
Closed
not-art
started this conversation in
Help wanted
Replies: 1 comment
-
This is resolved. We realized a db query on fridays could sometimes run long enough and lock the thread, causing our connection to exceed the 120 second timeout for 2 missed heartbeats. I added logic to reconnect when a broken pipe connection happens on checkHeartBeat() via a try/catch and everything works as-intended now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi y'all,
I did a search for this exact case but couldn't find solutions. My team's running a rabbitmq consumer that is spun up before batch-processing some things. and we publish the messages to. We have our own RabbitMQ cluster internally.
Our processing that publishes to the queue runs in the morning, and in the afternoon.
This works all week, except for Friday afternoon where we have a large batch in the morning- the afternoon job cannot publish any messages.
We're using a single connection, and we close/reopen channels & connection as-needed.
It's almost like there's a max connections limit for the connection, despite closing connections? It seems the morning run on Friday's uses up all connections, then we get nothing but:
RabbitMQ Channel not initialized / PhpAmqpLib\Exception\AMQPConnectionClosedException: Broken pipe or closed connection errors.
Processing continues to work on every other day, but for some reason the next run after a big job does not seem to work (which right now is just Friday afternoons).
Any help is appreciated, thanks!
Our setup:
Beta Was this translation helpful? Give feedback.
All reactions