fix: improve Redis connection error messages and add staging troubleshooting playbooks

- Improve Redis connection error message to include password info
- Add Ansible playbooks for staging 502 error troubleshooting
  - check-staging-status.yml: Check nginx logs and upstream config
  - fix-staging-502-verify.yml: Fix and verify nginx upstream configuration
This commit is contained in:
2025-11-02 02:16:12 +01:00
parent 70875be4b9
commit 4cec6dd8a0
3 changed files with 142 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ final class RedisConnection implements RedisConnectionInterface
throw new RedisConnectionException("Failed to connect to Redis server");
}
// Authenticate if password is provided
// Authenticate if a password is provided
if ($this->config->password) {
if (! $this->client->auth($this->config->password)) {
throw new RedisConnectionException("Redis authentication failed");
@@ -112,7 +112,7 @@ final class RedisConnection implements RedisConnectionInterface
$this->connected = false;
throw new RedisConnectionException(
"Failed to connect to Redis ({$this->name}): " . $e->getMessage() . " with Host: {$this->config->host}",
"Failed to connect to Redis ({$this->name}): " . $e->getMessage() . " with Host: {$this->config->host} and Password: {$this->config->password}",
previous: $e
);
}