File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -510,14 +510,21 @@ public function read($sessionId)
510
510
// Limit concurrent lock waiters to prevent server resource hogging
511
511
if ($ waiting >= $ this ->_maxConcurrency ) {
512
512
// Overloaded sessions get 503 errors
513
- $ this ->_redis ->hIncrBy ($ sessionId , 'wait ' , -1 );
514
- $ this ->_sessionWritten = true ; // Prevent session from getting written
515
- list ($ writes , $ lockedRequestUrl ) = $ this ->_redis ->hMGet ($ sessionId , ['writes ' ,'req ' ]);
513
+ try {
514
+ $ this ->_redis ->hIncrBy ($ sessionId , 'wait ' , -1 );
515
+ $ this ->_sessionWritten = true ; // Prevent session from getting written
516
+ $ sessionInfo = $ this ->_redis ->hMGet ($ sessionId , ['writes ' ,'req ' ]);
517
+ } catch (Exception $ e ) {
518
+ $ this ->_log ("$ e " , LoggerInterface::WARNING );
519
+ }
516
520
$ this ->_log (
517
521
sprintf (
518
522
'Session concurrency exceeded for ID %s; displaying HTTP 503 (%s waiting, %s total '
519
523
. 'requests) - Locked URL: %s ' ,
520
- $ sessionId , $ waiting , $ writes , $ lockedRequestUrl
524
+ $ sessionId ,
525
+ $ waiting ,
526
+ isset ($ sessionInfo ['writes ' ]) ? $ sessionInfo ['writes ' ] : '- ' ,
527
+ isset ($ sessionInfo ['req ' ]) ? $ sessionInfo ['req ' ] : '- '
521
528
),
522
529
LoggerInterface::WARNING
523
530
);
You can’t perform that action at this time.
0 commit comments