It sounds like you're experiencing issues with your Redis queue and Supervisor after upgrading from Laravel 10 to Laravel 11. Here are a few steps you can take to diagnose and potentially resolve the issue:
-
Check Supervisor Configuration: Ensure that your Supervisor configuration is correct and hasn't been altered during the upgrade. Specifically, check the
supervisord.conffile and the configuration files for your Laravel queue workers.[program:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /path/to/your/project/artisan queue:work redis --sleep=3 --tries=3 --timeout=90 autostart=true autorestart=true user=youruser numprocs=8 redirect_stderr=true stdout_logfile=/path/to/your/project/worker.log -
Check Redis Configuration: Verify your Redis configuration, especially the persistence settings. The logs you provided indicate frequent background saving, which might be related to the issue.
# redis.conf save 900 1 save 300 10 save 60 10000Ensure that the
savedirectives are set appropriately for your use case. You might also want to check themaxmemoryandmaxmemory-policysettings to ensure Redis isn't evicting keys unexpectedly. -
Check Laravel Queue Configuration: Ensure that your
config/queue.phpconfiguration file is set up correctly for Redis. Pay attention to theretry_afterandblock_forsettings.'redis' => [ 'driver' => 'redis', 'connection' => 'default', 'queue' => env('REDIS_QUEUE', 'default'), 'retry_after' => 90, 'block_for' => null, ], -
Check for Laravel 11 Changes: Review the Laravel 11 upgrade guide and changelog to see if there are any changes that might affect your queue or Redis configuration. There might be breaking changes or new configurations that need to be adjusted.
-
Monitor Logs: Keep an eye on your Laravel logs (
storage/logs/laravel.log) and Supervisor logs to see if there are any errors or warnings that could provide more insight into the issue. -
Redis Memory Usage: Monitor Redis memory usage to ensure it isn't hitting any limits. You can use the
INFOcommand in the Redis CLI to get detailed information about memory usage.redis-cli INFO memory -
Upgrade Redis: Ensure that your Redis server is up to date. Sometimes, upgrading Redis can resolve unexpected issues.
-
Check for Redis Key Expiry: Ensure that your Redis keys are not expiring unexpectedly. You can use the
TTLcommand to check the time-to-live of keys.redis-cli TTL your-key
By following these steps, you should be able to identify and resolve the issue with your Redis queue and Supervisor after upgrading to Laravel 11. If the problem persists, consider reaching out to the Laravel community or checking the Laravel GitHub repository for any related issues.