laravel/pulse

When restart pulse:work get error if have ingest

swaty007 opened this issue · 1 comments

Pulse Version

1.4.0

Laravel Version

11.42.1

PHP Version

8.3.14

Livewire Version

3.4.9

Database Driver & Version

Postgre + Redis

Description

PULSE_ENABLED=true
PULSE_INGEST_DRIVER=redis

supervisord config
[program:pulse-work]
process_name=%(program_name)s_%(process_num)02d
command=/usr/local/bin/php /var/www/artisan pulse:work
autostart=true
autorestart=true
numprocs=1
user=www-data
redirect_stderr=true
stdout_logfile=/dev/stdout
logfile_maxbytes=0
stopwaitsecs=3600
startretries=30
stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0

Undefined variable $i {"exception":"[object] (ErrorException(code: 0): Undefined variable $i at /var/www/vendor/predis/predis/src/Connection/StreamConnection.php:334)
[stacktrace]
#0 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/vendor/predis/predis/src/Connection/StreamConnection.php(334): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
#2 /var/www/vendor/predis/predis/src/Connection/StreamConnection.php(334): Predis\Connection\StreamConnection->read()
#3 /var/www/vendor/predis/predis/src/Connection/StreamConnection.php(334): Predis\Connection\StreamConnection->read()
#4 /var/www/vendor/predis/predis/src/Connection/AbstractConnection.php(132): Predis\Connection\StreamConnection->read()
#5 /var/www/vendor/predis/predis/src/Connection/AbstractConnection.php(124): Predis\Connection\AbstractConnection->readResponse()
#6 /var/www/vendor/predis/predis/src/Client.php(381): Predis\Connection\AbstractConnection->executeCommand()
#7 /var/www/vendor/laravel/pulse/src/Support/RedisAdapter.php(137): Predis\Client->executeCommand()
#8 /var/www/vendor/laravel/pulse/src/Support/RedisAdapter.php(116): Laravel\Pulse\Support\RedisAdapter->run()
#9 /var/www/vendor/laravel/pulse/src/Support/RedisAdapter.php(53): Laravel\Pulse\Support\RedisAdapter->handle()
#10 /var/www/vendor/laravel/pulse/src/Ingests/RedisIngest.php(81): Laravel\Pulse\Support\RedisAdapter->xrange()
#11 /var/www/vendor/laravel/pulse/src/Pulse.php(328): Laravel\Pulse\Ingests\RedisIngest->digest()
#12 /var/www/vendor/laravel/pulse/src/Pulse.php(254): Laravel\Pulse\Pulse->Laravel\Pulse\{closure}()
#13 /var/www/vendor/laravel/pulse/src/Pulse.php(327): Laravel\Pulse\Pulse->ignore()
#14 /var/www/vendor/laravel/pulse/src/Commands/WorkCommand.php(50): Laravel\Pulse\Pulse->digest()
#15 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\Pulse\Commands\WorkCommand->handle()
#16 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#17 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure()
#18 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#19 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(696): Illuminate\Container\BoundMethod::call()
#20 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\Container\Container->call()
#21 /var/www/vendor/symfony/console/Command/Command.php(279): Illuminate\Console\Command->execute()
#22 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\Component\Console\Command\Command->run()
#23 /var/www/vendor/symfony/console/Application.php(1094): Illuminate\Console\Command->run()
#24 /var/www/vendor/symfony/console/Application.php(342): Symfony\Component\Console\Application->doRunCommand()
#25 /var/www/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRun()
#26 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(198): Symfony\Component\Console\Application->run()
#27 /var/www/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#28 {main}

Steps To Reproduce

When restart container sometimes get this error

Seems like this is an issue with, and originating in, Predis: predis/predis#812

Likely not something we can solve in Pulse. If this continues I would recommend switching to phpredis.

I'll take a quick look at the Predis source to see if I can help the project, but I don't really see how this code could cause the issue:

Image

I'm going to close this as there isn't anything we can do, but for the sake of trying to help Predis, would you mind sharing the exact version of Predis you have installed in your project when you see this error. You can check that by running the following command:

composer show | grep predis