We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8f50ec2 + 9719fe5 commit 27cabb6Copy full SHA for 27cabb6
src/SessionRetriever.php
@@ -47,7 +47,13 @@ public function retrieve(): array
47
ini_set('session.cookie_secure', (string) $this->secure);
48
ini_set('session.cookie_httponly', '1');
49
50
- session_start();
+ // When AWS Elasticache DNS resolution fails, PHP throws an error
51
+ // session_start(): php_network_getaddresses: getaddrinfo failed: Name or service not known
52
+ // This error is happening on 0.02% of our requests and AWS treat it as transient network
53
+ // issues. Retrying before giving up might mitigate the problem.
54
+ retry(3, function () {
55
+ session_start();
56
+ });
57
58
$this->session = $_SESSION;
59
0 commit comments