Skip to content

[Console] add console.alarm event #47920

Closed
@dkarlovi

Description

@dkarlovi

Description

Currently, the Doctrine connection can get pinged on each new message if the middleware is enabled. But, the message handlers can be very heavy and timeouts short (for example, default wait_timeout on Azure MySQL is 180s).

If you have a very heavy handler, the handler execution process might be longer than the idle timeout and, once the handler completes, ack() can throw an MySQL has gone away error even though the connection was pinged successfully when the message was received.

The suggestion is to basically incorporate this https://twitter.com/lyrixx/status/1575127719624544258 into DoctrinePingConnectionMiddleware (or in a more appropriate place).

/cc @lyrixx

Example

  1. new message
  2. ping connection, valid
  3. run handler, it does a bunch of stuff (say, 3rd party APIs, etc)
  4. 5min later...
  5. ack() fails with MySQL has gone away, SSL: Connection reset by peer or similar error

This change would ensure the connection is "exercised" during the handler execution window too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions