You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's assume you're not using Doctrine as your Messenger transport, but you are using Doctrine ORM.
The latest alarm based features added by @HypeMC in #53533 and #53508 provided a way to refresh the transports, and this got expanded to Doctrine too in #59601.
But, the Doctrine middleware is does not honor this and Doctrine will only get refreshed by the alarm if you're using Doctrine as your Messenger transport too.
Example:
use Beanstalk (or any other transport except Doctrine) as your Messenger transport
message comes in, Doctrine middleware runs to refresh the connection
processing the message takes say 10min
the alarm keeps triggering and the Beanstalk connection is getting refreshed, but not Doctrine's
before the message is processed, the end result needs to be written into the DB, but the database connection is closed by the server due to 10min idle (it was refreshed on message arrival)
How to reproduce
See above.
Possible Solution
If you've enabled the Doctrine middleware, it should get triggered by the alarm too.
Additional Context
Technically, the original intent of #47920 was not solved.
The text was updated successfully, but these errors were encountered:
Yes, that would work. However, that might trigger the middleware outside of the context of messenger if I'm not mistaking.
dkarlovi
changed the title
[Messenger] run "refresh database connection" Doctrine middleware with the new alarm based event
[Messenger] run "ping database connection" Doctrine middleware with the new alarm based event
Apr 3, 2025
Symfony version(s) affected
7.3.x
Description
Let's assume you're not using Doctrine as your Messenger transport, but you are using Doctrine ORM.
The latest alarm based features added by @HypeMC in #53533 and #53508 provided a way to refresh the transports, and this got expanded to Doctrine too in #59601.
But, the Doctrine middleware is does not honor this and Doctrine will only get refreshed by the alarm if you're using Doctrine as your Messenger transport too.
Example:
How to reproduce
See above.
Possible Solution
If you've enabled the Doctrine middleware, it should get triggered by the alarm too.
Additional Context
Technically, the original intent of #47920 was not solved.
The text was updated successfully, but these errors were encountered: