Hi All,
I have been using Laravel since version 6, and upgrade as new versions come out. I am running Laravel 10, latest update. I am using predis.
I have a long running process that subscribes to redis, per the Laravel documentation. Here is a test program I wrote:
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redis;
class Test extends Command
{
protected $signature = 'development:test';
protected $description = 'Test';
public function handle()
{
Redis::psubscribe(['foo.*'], function ($message, $channel) {
Log::debug("in here");
});
}
}
I used to be able to CTRL-C on my Mac and it would kill the process, which I think is sig INT. It stopped working like that and CTRL-C in the terminal no longer stops the process, I actually have to find the PID and kill it.
I am seeing this same behavior in our production environment, supervisor keeps this process running. When I restart supervisor it use to instantly return me to the prompt (presumably because it send an sig INT to this command which immediately exited).
Now supervisor takes a really long time to restart, my guess is that it times out and eventually kills the process like I do on my dev box.
I can't tell if this changed when I upgraded to Laravel 10, or a recent update to Laravel 10, or maybe a predis update.
Any ideas would be greatly appreciated.
Thanks!