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

Donny5300's avatar

Laravel Vapor Queues not dispatched

Hi guys,

Since yesterday I'm using Vapor for deployment. The following config is that I use:

id: 12345
name: MyApplication
environments:
  production:
    memory: 1024
    cli-memory: 512
    runtime: 'php-8.2:al2'
    timeout: 28
    domain:
      - "my-domain.com"
      - "*.my-domain.com"
    database: DatabaseName
    cache: CacheName
    queues:
      - default
      - webhooks
      - orders
    queue-timeout: 900
    build:
      - 'composer install --no-dev'
      - 'php artisan event:cache'

In my environment, I've set the SQS_SUFFIX to SQS_SUFFIX="-production". Made a new deployment to make the env variables being updated. Now, i call a job through a route which is simple:

$job = new HelloWorldJob('Hello to the world');
dispatch($job)->onQueue('webhooks');

The queue receives the message but it's not being dispatched. Does anybody has a idea what I'm missing?

My env file:

APP_KEY=*****************
APP_DEBUG=false
MAIL_DRIVER=ses
MAIL_MAILER=ses
APP_NAME="My App"
APP_URL="https://my-domain.com"
SESSION_DOMAIN=my-domain.com
NOVA_LICENSE_KEY=********
NOVA_USERNAME=***********
SESSION_STORE=redis
SESSION_DRIVER=redis
CACHE_DRIVER=redis
TWIG_VIEW_COMPILED_PATH=/tmp
LIGHTSPEED_BACKOFFICE_API_STORAGE_DIR=/tmp
SQS_SUFFIX="-production"
0 likes
1 reply
LaryAI's avatar
Level 58

It seems like you've configured your Laravel Vapor environment correctly, and you're dispatching the job to the queue as expected. However, there are a few things you can check to troubleshoot why your queue jobs are not being dispatched:

  1. Queue Worker: Ensure that the queue worker is running. In Vapor, this should be managed automatically, but it's worth checking the Vapor dashboard to see if there are any issues with the queue workers.

  2. Queue Configuration: Double-check your config/queue.php configuration file to ensure that the connection and queue names match what you've set in Vapor and your .env file. The SQS_SUFFIX should append to your queue names.

  3. Job Class: Make sure that your HelloWorldJob is implementing the ShouldQueue interface and that it's using the Dispatchable trait. This is necessary for the job to be queued properly.

  4. Error Handling: Check the Vapor logs for any errors that might have occurred during job processing. If a job fails to process due to an error, it won't be dispatched.

  5. Environment Variables: Verify that the environment variables related to the queue connection, such as AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION, are set correctly in your Vapor environment.

  6. SQS Permissions: Ensure that the IAM user whose credentials you're using has the necessary permissions to interact with SQS, including sending messages to the queue and receiving/deleting messages from the queue.

  7. Queue Name: The SQS_SUFFIX is appended to your queue names. Make sure that the queue name you're dispatching jobs to (webhooks) actually exists in SQS as webhooks-production.

  8. Delayed Jobs: If you're using delayed jobs, ensure that the delay is not set too far in the future, which might make it seem like the job is not being dispatched.

If after checking all these points the issue still persists, you might want to reach out to Laravel Vapor support for further assistance, as the problem could be related to the Vapor infrastructure itself.

Please or to participate in this conversation.