Class SocketTimeoutChecker
Custom S3 exponential backoff checking use to retry 400 responses containing the following reason phrase: "Your socket connection to the server was not read from or written to within the timeout period.". This error has been reported as intermittent/random, and in most cases, seems to occur during the middle of a transfer. This plugin will attempt to retry these failed requests, and if using a local file, will clear the stat cache of the file and set a new content-length header on the upload.
- Guzzle\Plugin\Backoff\AbstractBackoffStrategy implements Guzzle\Plugin\Backoff\BackoffStrategyInterface
-
Aws\S3\SocketTimeoutChecker
Methods summary
-
public
__construct ( Guzzle\Plugin\Backoff\BackoffStrategyInterface $next = null )
{@inheridoc}
-
public
makesDecision ( )
{@inheridoc}
-
protected
getDelay ( int $retries, Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response = null, Guzzle\Http\Exception\HttpException $e = null )
Implement the concrete strategy
Methods detail
{@inheridoc}
{@inheridoc}
Returns
boolean
#
protected
boolean|integer|null
getDelay( integer $retries, Guzzle\Http\Message\RequestInterface
$request, Guzzle\Http\Message\Response
$response = null, Guzzle\Http\Exception\HttpException
$e = null )
Implement the concrete strategy
Parameters
- $retries
integer
$retries Number of retries of the request- $request
Guzzle\Http\Message\RequestInterface
$request Request that was sent- $response
Guzzle\Http\Message\Response
$response Response that was received. Note that there may not be a response- $e
Guzzle\Http\Exception\HttpException
$e Exception that was encountered if any
Returns
boolean|integer|null
Returns false to not retry or the number of seconds to delay between retries. Return true or null to defer to the next strategy if available, and if not, return 0.
Methods inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
getBackoffPeriod()
,
getNext()
,
setNext()
Magic methods summary
Constants summary
string |
ERR |
'Your socket connection to the server was not read from or written to within the timeout period' |