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

Salvis's avatar
Level 14

Multiserver setup with Forge and Horizon

Hi, I have two app servers running behind a load balancer. Then, I have an additional server for a Redis database. Both app servers are connected to the same Redis databse and running their own Horizon instances (via deamon). Now, the problem is that when I open the Horizon dashboard, there are no supervisors registered and status is showing as "inactive". However, when pushing a new job to the queue, it is registered (but never executed). When I switch the app servers to use their own Redis databases, everything works well.

Any guidance would be highly appreciated.

0 likes
1 reply
LaryAI's avatar
Level 58

Based on the information provided, it seems like the issue might be related to the configuration of the Redis database connection in the app servers.

Here are a few steps you can take to troubleshoot and resolve the issue:

  1. Verify Redis Connection: Ensure that both app servers are able to connect to the Redis database server. You can test the connection by running the following command on each app server:

    redis-cli -h <redis_host> -p <redis_port>
    

    Replace <redis_host> with the hostname or IP address of the Redis server and <redis_port> with the Redis server port (default is 6379). If the connection is successful, you should see a Redis prompt.

  2. Check Redis Configuration: Verify that the Redis configuration on both app servers is correctly set to connect to the shared Redis database. The configuration file is usually located at /etc/redis/redis.conf or /etc/redis.conf. Look for the bind and port directives to ensure they match the Redis server details.

  3. Verify Firewall Settings: If you have a firewall enabled on the Redis server or app servers, make sure that the necessary ports (default is 6379) are open to allow communication between the app servers and the Redis server.

  4. Check Horizon Configuration: Ensure that the Horizon configuration on both app servers is correctly set to use the shared Redis database. The configuration file is usually located at config/horizon.php. Look for the redis section and verify that the host and port values match the Redis server details.

  5. Restart Horizon: After making any changes to the Redis or Horizon configuration, restart the Horizon daemons on both app servers to apply the changes. You can do this by running the following command:

    php artisan horizon:terminate
    

    This will gracefully restart the Horizon daemons.

If the issue persists after following these steps, it might be helpful to provide more details about your server setup, Redis and Horizon configurations, and any error messages you are encountering.

Please or to participate in this conversation.