messenger-monitor-bundle icon indicating copy to clipboard operation
messenger-monitor-bundle copied to clipboard

Worker Cache does not get updated if worker crashes

Open bendavies opened this issue 1 year ago • 5 comments

Hi,

Unsure if this is solvable but the worker cache becomes incorrect/stale if a worker crashes. The Symfony Worker doesn't dispatch an event for this.

Can you think of a way to solve this?

Thanks

bendavies avatar Nov 13 '24 21:11 bendavies

The cache has a 5 minute TTL so it should drop eventually, right?

I'm not sure how else we can drop it.

Let's keep this open in case one of us gets an idea 💡

kbond avatar Nov 14 '24 03:11 kbond

ah right, but it's 1 hour not 5 minutes, right? https://github.com/zenstruck/messenger-monitor-bundle/blob/e6a804a80b17388111f9e52eba09d9dfd9743839/src/DependencyInjection/ZenstruckMessengerMonitorExtension.php#L72C44-L72C48

bendavies avatar Nov 14 '24 10:11 bendavies

Ah yes, you're right. I don't think we want to reduce it too much as there could be long running jobs that could trigger cause the worker to be dropped. An hour seems long though...

kbond avatar Nov 14 '24 13:11 kbond

I just remembered this ttl can be configured.

kbond avatar Nov 23 '24 21:11 kbond

👍

bendavies avatar Nov 23 '24 21:11 bendavies