Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ralphmorris's avatar

Queues on Forge

2 quick questions on if anyone can clear this up for me?

  1. Should the Maximum Seconds per job in the Forge settings match the TTR in my config/queue.php? I currently have a limit of 10 in my TTR config but 0 (No timeout) in Forge. I'm not sure if these are related? I see other people are setting to 90, so is my 10 a little low. I am mainly just queue mail.

  2. Are 'Processes' in Forge the equivalent of logging in in the terminal with two different tabs and running php artisan queue:listen twice on the same site? Probably a stupid question but have anyone to ask!

Edit: Just to add to this question:

I've added a new feature which is going to throw approx 400 jobs on to the queue which will then each send an email to a user.

This is working with a smaller amounts of jobs but 400 is crashing homestead when testing with a copy of production database. Generally, recently I did update homestead recently and have had it occasionally freeze on me which I haven't been able to get the the bottom of. But every time I try to put these 400 jobs on to the queue locally homestead freezes.

Is this to be expected locally? For production I am using Digital Oceans $20 per month, 2gb memory, 2 vCPU, 40gb SSD, 3TB transfer server.

Just a bit concerned about releasing this to production if it is going to cause problems.

Thanks!

0 likes
3 replies
bobbybouwmann's avatar
Level 88
  1. Well people put it to 90 seconds, because there jobs take too long. In general the lower the time the better. Your jobs shouldn't take 90 seconds unless you're doing image manipulations or so.

  2. Yes, that's true. It determines how many processes will be run at the same time

  3. It shouldn't give any issues. I have an application running on Forge (developed using Homestead) which runs around 2 million jobs a day. I sometimes have over 100K jobs in the queue waiting.

shez1983's avatar

i think the answer to your 'fourth' question is answered by yourself

nd have had it occasionally freeze on me which I haven't been able to get the the bottom of
ralphmorris's avatar

Thanks @bobbybouwmann for your reply. It was really helpful.

Can I just double check question 1 though? If I set the ttr in my config/queue.php to 10, do I then need to set my Timeout config to 10 also? Or does the timeout need to be larger?

I updated my forge queues to have more workers and all has been fine for a few days sending quite a few emails until just now i've had this:

Pheanstalk\Exception\ServerException: Cannot delete job 16309: NOT_FOUND 

I think this is because I still had no Timeout set in Forge, but did have the ttr set to 10 in my config. Does that sound right?

My app sent out about 40 emails and I had 3 of those exceptions. From looking at my mail logs, I can see a few of the emails look like they got sent twice.

Thanks again

1 like

Please or to participate in this conversation.