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

dniccum's avatar

Using Laravel Horizon on Vapor

Has anyone been successful in deploying Laravel Horizon to a Vapor instance? I am currently attempting to configure my environment and I am discovering some omissions within the documentation regarding Vapor and Horizon.

Currently I am getting this error: Redis connection [horizon] not configured.

Any assistance would be appreciated.

0 likes
5 replies
bugsysha's avatar
bugsysha
Best Answer
Level 61

I think that it wasn't planned to have Horizon with Vapor. Cause you have to set how many processes Horizon will run in order to process queue. Now with Vapor that doesn't make sense since it will spin up new instances on demand so no need for processes to sit and wait for a job to pop into queue.

eresources's avatar

That's fine, except that there are other reasons to use Horizon beyond the very basic task of monitoring the queue. You can also use it to monitor execution times, success rates of the jobs themselves, etc. It would still make sense to have a monitoring tool even if one aspect of it doesn't make as much sense in a serverless environment.

bugsysha's avatar

There is nothing wrong with the way you think. Who knows. Maybe some day.

StevePorterIO's avatar

Hi @dniccum!

We're using horizon with vapor to monitor queues and jobs. It sounds like our use cases are similar, we're also not interested in the queue management aspect of horizon, we just want fancy dashboards!

The error you're receiving is due to horizon storing all the metrics it needs to populate its dashboards in redis.

If you add a cache value to your environment in your vapor.yml, vapor will inject all the environment variables you need into the runtime so this should just start working

id: *
name: my-service
environments:
    production:
        cache: production // <--- this here
...

I appreciate this is a year late, but do let me know how you get on!

1 like
kylecmccandless's avatar

@StevePorterIO Hey bud, is there anything else you did to resolve this issue? We are still receiving this error: InvalidArgumentException PHP 8.1.0 9.8.1 Redis connection [horizon] not configured.

Please or to participate in this conversation.