We have two different pods in Kubernetes for our Laravel app,
- one running apache serving on port 80, (CMD /usr/sbin/apache2ctl -D FOREGROUND)
- and another running worker (Laravel Horizon) (CMD php /var/www/artisan horizon)
The issue is when I check the horizon dashboard, it says 'Active', and I can see the Jobs in the 'Pending Jobs' section, but they never actually execute. They are just sitting there idle.
Now, when I SSH in the pod running apache and manually and run the command 'php artisan horizon' than it actually executes all pending jobs.
I have already ensured the followings:
- Both the pods are connected with the same Redis database service
- Horizon Prefix is the same for both the pods