Argument 2 passed to PheanstalkJob::__construct() must be of the type string, null given

I’m running a Laravel application and using Beanstalkd and "pda/pheanstalk": "^4.0" for my queue and it works perfectly. However, after a few hours, my jobs start crashing and it throws this crash and when I do php artisan queue:restart it starts working again. There is nothing specific about my code or application in these logs. Has anyone encountered this situation before?

Argument 2 passed to PheanstalkJob::__construct() must be of the type string, null given, called in /var/www/api/vendor/pda/pheanstalk/src/Pheanstalk.php on line 278 {"exception":"[object] (SymfonyComponentDebugExceptionFatalThrowableError(code: 0): Argument 2 passed to PheanstalkJob::__construct() must be of the type string, null given, called in /var/www/api/vendor/pda/pheanstalk/src/Pheanstalk.php on line 278 at /var/www/api/vendor/pda/pheanstalk/src/Job.php:30)
[stacktrace]
#0 /var/www/api/vendor/pda/pheanstalk/src/Pheanstalk.php(278): PheanstalkJob->__construct(1, NULL)
#1 /var/www/api/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php(129): PheanstalkPheanstalk->reserveWithTimeout(0)
#2 /var/www/api/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(253): IlluminateQueueBeanstalkdQueue->pop('express')
#3 /var/www/api/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(107): IlluminateQueueWorker->getNextJob(Object(IlluminateQueueBeanstalkdQueue), 'express')
#4 /var/www/api/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(102): IlluminateQueueWorker->daemon('beanstalkd', 'express,listing...', Object(IlluminateQueueWorkerOptions))
#5 /var/www/api/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(86): IlluminateQueueConsoleWorkCommand->runWorker('beanstalkd', 'express,listing...')
#6 [internal function]: IlluminateQueueConsoleWorkCommand->handle()
#7 /var/www/api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#8 /var/www/api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): IlluminateContainerBoundMethod::IlluminateContainer{closure}()
#9 /var/www/api/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): IlluminateContainerBoundMethod::callBoundMethod(Object(IlluminateFoundationApplication), Array, Object(Closure))
#10 /var/www/api/vendor/laravel/framework/src/Illuminate/Container/Container.php(576): IlluminateContainerBoundMethod::call(Object(IlluminateFoundationApplication), Array, Array, NULL)
#11 /var/www/api/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): IlluminateContainerContainer->call(Array)
#12 /var/www/api/vendor/symfony/console/Command/Command.php(255): IlluminateConsoleCommand->execute(Object(SymfonyComponentConsoleInputArgvInput), Object(IlluminateConsoleOutputStyle))
#13 /var/www/api/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): SymfonyComponentConsoleCommandCommand->run(Object(SymfonyComponentConsoleInputArgvInput), Object(IlluminateConsoleOutputStyle))
#14 /var/www/api/vendor/symfony/console/Application.php(915): IlluminateConsoleCommand->run(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#15 /var/www/api/vendor/symfony/console/Application.php(272): SymfonyComponentConsoleApplication->doRunCommand(Object(IlluminateQueueConsoleWorkCommand), Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#16 /var/www/api/vendor/symfony/console/Application.php(148): SymfonyComponentConsoleApplication->doRun(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#17 /var/www/api/vendor/laravel/framework/src/Illuminate/Console/Application.php(90): SymfonyComponentConsoleApplication->run(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#18 /var/www/api/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(133): IlluminateConsoleApplication->run(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#19 /var/www/api/artisan(37): IlluminateFoundationConsoleKernel->handle(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#20 {main}
"}

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *