Okay, i've resetted all supervisors several times and also redis service for both redis-prod and redis-staging (test). And it worked. But now, test environment is failing to connect to redis through port 6380, even though I can via redis-cli -h 127.0.0.1 -p 6380.
I'd have deleted this thread and create a new one, but i've no idea how.
Horizon mixing {prod} and {test} supervisors
I've set up two Redis services on the same VM. One with 6379 and the other with 6380 port. I've configured my config/database.app such as:
'redis' => [
'client' => 'predis',
'production' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
'test' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6380),
'database' => 0,
],
'local' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
],
and my config/horizon.php as:
'use' => env('APP_ENV'),
'environments' => [
'production' => [
'supervisor-prod-1' => [
'connection' => 'redis',
'queue' => ['syncronic'],
'balance' => 'simple',
'processes' => 1,
'timeout' => 0,
],
'supervisor-prod-2' => [
'connection' => 'redis',
'queue' => ['high-concurrency', 'notifications'],
'balance' => 'auto',
'processes' => 12,
'timeout' => 0,
],
],
'test' => [
'supervisor-test-1' => [
'connection' => 'redis',
'queue' => ['syncronic'],
'balance' => 'simple',
'processes' => 1,
'timeout' => 0,
],
'supervisor-test-2' => [
'connection' => 'redis',
'queue' => ['high-concurrency', 'notifications'],
'balance' => 'auto',
'processes' => 12,
'timeout' => 0,
],
],
// ommited local since it's the same as prod...
],
As you can see, redis.test is running on 6380 port. My application is showing 26 processes in total (should be 13) on each environment, showing 4 supervisors instead of 2. When i'm looking at test horizon i see: 'supervisor-test-1' 'supervisor-test-1' 'supervisor-1' 'supervisor-2'
When i'm looking at prod horizon i see: 'supervisor-prod-1' 'supervisor-prod-1' 'supervisor-1' 'supervisor-2'
Mind you, both environments are in the same server (not my decision).
Please help, documentation is really scarce regarding these kind of issues.
PS: can't seem to upload pictures inside this editor, but will upload after i Post this. This is my first time asking but not my first time looking for answers here.
Please or to participate in this conversation.