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:
-
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. -
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.confor/etc/redis.conf. Look for thebindandportdirectives to ensure they match the Redis server details. -
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.
-
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 theredissection and verify that thehostandportvalues match the Redis server details. -
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:terminateThis 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.