Laravel 4 Queue Taking Long Time

146 Views Asked by At

I'm using iron.io for Queues in Laravel. They were working great until recently. Now a line of code like this one takes an eternity:

$sec = 5*60;
Queue::later($sec, 'MyClass@fire', ['id' => 1]);

MyClass->fire sends a bunch of emails so it's almost like it's sending the emails rather than sending the request to iron.io. But it's not. I removed all of the code in MyClass->fire and it still takes about 30s. But when I comment out Queue::later(... it runs really quickly.

It's like there's something wrong with Queue class. Or there's something wrong with the way my server communicates with iron.io.

Or maybe something wrong with the package I'm using. I know that it's really old (I think I'm using iron_mq v 1.3.0.) so maybe something has changed with the way the package I'm using works with iron.io. I'll try updating it in the morning but that might mess everything up.

Any ideas?

2

There are 2 best solutions below

0
On

There could be issues at 2 stages, that would need to be debugged.. 1) If the version of ironmq client and server are same, if not if there a change in way they communicate (I would say this is most important to debug) 2) If calling latter triggers a queue in ironmq, is the call received in ironmq and it is taking longer to respond..

0
On

It could be related to network issues while connecting to IronMQ clusters. I checked the latency for two public clusters (us-east-1 and eu-west-1) and it takes less than 1 sec now.