laravel / lumen-framework

The Laravel Lumen Framework.
https://lumen.laravel.com
MIT License
1.48k stars 419 forks source link

Redis Queue Failed Job is being log to MySQL #480

Closed apburton84 closed 8 years ago

apburton84 commented 8 years ago

Queue driver is set to use Redis

QUEUE_DRIVER=redis

With

php /opt/artisan queue:work --tries=1 --queue="data-ingestion-default" --daemon

The error, we receive is

[2016-09-14 08:32:40] lumen.ERROR: InvalidArgumentException: Database [mysql] not 
configured. in /opt/vendor/illuminate/database/DatabaseManager.php:239
Stack trace:
#0 /opt/vendor/illuminate/database/DatabaseManager.php(158):     
Illuminate\Database\DatabaseManager->getConfig('mysql')
#1 /opt/vendor/illuminate/database/DatabaseManager.php(68):   
Illuminate\Database\DatabaseManager->makeConnection('mysql')
#2 /opt/vendor/illuminate/queue/Failed/DatabaseFailedJobProvider.php(110): 
Illuminate\Database\DatabaseManager->connection('mysql')
#3 /opt/vendor/illuminate/queue/Failed/DatabaseFailedJobProvider.php(58):    
Illuminate\Queue\Failed\DatabaseFailedJobProvider->getTable()
#4 /opt/vendor/illuminate/queue/Worker.php(313): 
Illuminate\Queue\Failed\DatabaseFailedJobProvider->log('redis', 'data-ingestion-...',    
'{"job":"Illumin...')
#5 /opt/vendor/illuminate/queue/Worker.php(204): Illuminate\Queue\Worker-
>logFailedJob('redis', Object(Illuminate\Queue\Jobs\RedisJob))
#6 /opt/vendor/illuminate/queue/Worker.php(156): Illuminate\Queue\Worker->process('redis',   
Object(Illuminate\Queue\Jobs\RedisJob), '1', 0)
#7 /opt/vendor/illuminate/queue/Worker.php(111): Illuminate\Queue\Worker->pop(NULL, 'data-   
ingestion-...', 0, 3, '1')
#8 /opt/vendor/illuminate/queue/Worker.php(85): Illuminate\Queue\Worker-
>runNextJobForDaemon(NULL, 'data-ingestion-...', 0, 3, '1')
#9 /opt/vendor/illuminate/queue/Console/WorkCommand.php(119): Illuminate\Queue\Worker-
>daemon(NULL, 'data-ingestion-...', 0, 128, 3, '1')
#10 /opt/vendor/illuminate/queue/Console/WorkCommand.php(78): 
Illuminate\Queue\Console\WorkCommand->runWorker(NULL, 'data-ingestion-...', 0, 128, true)

It appears that the error is due to the Worker attempting to log the failed job to a mysql database.

However, we are not using MySQL in this instance, and if we were in config/database.php there is no 'mysql' in connection, and the default db is called 'development'.

Any help would be greatly appreciated

http://stackoverflow.com/questions/39487252/redis-queue-failed-job-is-being-logged-to-mysql

apburton84 commented 8 years ago

Apologies this issue is resolved by http://stackoverflow.com/questions/39487252/redis-queue-failed-job-is-being-logged-to-mysql

apburton84 commented 8 years ago

Closing