Skip to content

Conversation

@IJOL
Copy link

@IJOL IJOL commented Jul 29, 2024

No description provided.

$response = $this->read_reply($name);
$response = $this->decode_reply($name, $response, $trackedArgs);
$retryCount = 0;
$maxRetries = 5;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A hard-coded retry count really isn't appropriate, this should be linked to a configurable and probably with a lower limit or disabled by default.

$retryCount++;
if ($retryCount >= $maxRetries) {
throw $e; // Rethrow exception after max retries
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If retrying because of busy, wouldn't it make sense to have a configurable exponential backoff instead of instant retrying?

@colinmollenhour
Copy link
Owner

Just FYI, in case this is related to Cm_Cache_Backed_Redis and garbage collection you may be interested in this PR: colinmollenhour/Cm_Cache_Backend_Redis#185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants