action-scheduler icon indicating copy to clipboard operation
action-scheduler copied to clipboard

Big time difference for next queue

Open vaibhav011286 opened this issue 1 year ago • 4 comments
trafficstars

Hi, I am getting this notice: The next queue will begin processing in approximately 7761 seconds.

Can you please help me to sort this out asap. Thanks!

vaibhav011286 avatar Jun 10 '24 17:06 vaibhav011286

Hi, @vaibhav011286.

The lock duration defaults to one minute, whereas it seems yours may be configured to a much higher value. So, it's likely that this is set by another plugin you are using, or possibly by some custom code.

If you are unsure, then (perhaps within a staging site that faithfully replicates your live site) you could start by deactivating all plugins, then reactivate them one-by-one until you determine:

A) Which plugin or plugins use Action Scheduler. B) Which is overriding the lock timeout value.

Or, if you are comfortable doing so, you could consider scanning for references to action_scheduler_lock_duration (which is the name of the filter hook used when overriding the default lock timeout value).

barryhughes avatar Jun 10 '24 18:06 barryhughes

Hi, I searched whole WP using plguin String Locator, and not found any custom code which can override action_scheduler_lock_duration filter default value.

Attaching shot of found string in whole WP: zScreenshot-11-06-2024-00-18-27

vaibhav011286 avatar Jun 10 '24 18:06 vaibhav011286

Interesting, then I'm not sure where this is being changed or if some other factor is at work.

You could add a custom snippet (using your preferred tool, or else a custom plugin) to try and override things and force a 30 second lock duration, though:

add_filter( 'action_scheduler_lock_duration', fn () => 30, 1000 );

I recommend trying this first on a testing/staging site, however.

barryhughes avatar Jun 10 '24 20:06 barryhughes

@vaibhav011286 let us know if you need any further support. It doesn't seem like the origin of the problem is in Action Scheduler itself, though, so we'll likely close this issue in due course if we don't hear back.

barryhughes avatar Jun 17 '24 18:06 barryhughes

Closing.

barryhughes avatar Jul 04 '24 00:07 barryhughes