Support the ongoing development of Laravel.io →
Requests Queues

Hello,

I'm currently testing Iron.io push queues for some long running (2-3 minutes) jobs. I've noticed a strange behavior with jobs that run several minutes. I see them being run multiple times. I did some reading and found this behavior that Iron.io is aware about for jobs running longer than 60s.

http://dev.iron.io/mq/reference/push_queues/#long_running_processes__aka_202s

Long Running Processes - aka 202

If you'd like to take some time to process a message, more than the 60 second timeout, you must respond with HTTP status code 202. Be sure to set the "timeout" value when posting your message to the maximum amount of time you'd like your processing to take. If you do not explicitly delete the message before the "timeout" has passed, the message will be retried. To delete the message, check the "Iron-Subscriber-Message-Url" header and send a DELETE request to that URL.

I believe my longer jobs are being retried once they hit the 60s timeout.

Does anyone have a suggestion on how I could get this to work? Almost seems like I should try deleting the job from the queue even before it has finished running.

Thanks, Jay

Last updated 3 years ago.
0

The first thing you could try is just increasing the timeout when posting the job onto the queue. But yes, Iron wants you to delete job before it is done. That only becomes a problem if you think the job could fail afterwards.

Last updated 3 years ago.
0

Thanks @andrewryno. I did just that. I couldn't find an easy way to pass in the timeout, so I submitted a pull request to add that functionality in. Fixes the issue for me, no more multiple jobs showing up.

https://github.com/laravel/framework/pull/3555

Hopefully they include the changes as I found someone else having the same issue with long running jobs.

Jay

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.