title: How can I modify the timeout for curl with Guzzle?
body: <p>I am trying to upload a 2GB File to Amazon S3 with Guzzle. I am streaming the content and my code look like this:</p>
  
  <pre><code>$credentials = new Credentials( 'access_id', 'access_key');
  
          $s3 = S3Client::factory(array(
              'credentials' =&gt; $credentials
          ));;
  
          try {
              $s3-&gt;putObject(array(
                  'Bucket' =&gt; $bucket,
                  'Key'    =&gt; $obect,
                  'Body'   =&gt; (strlen($body) &lt; 1000 &amp;&amp; file_exists($body)) ? Guzzle\Http\EntityBody::factory(fopen($body, 'r+')) : $body,
                  'ACL'    =&gt; $acl,
                  'ContentType' =&gt; $content_type
              ));
              return true;
          } catch (Aws\Exception\S3Exception $e) {
              error_log($e -&gt; getMessage() . ' ' . $e -&gt; getTraceAsString());
              return false;
          }
  </code></pre>
  
  <p>Now the error I am getting is this:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception
    'Guzzle\Http\Exception\CurlException' with message '[curl] 28:
    Operation timed out after 30000 milliseconds with 0 out of -1 bytes
    received [url]
    <a href="https://xxxxx.s3.amazonaws.com/6e12e321-adac-42a0-a932-8f345f9dd9c6" rel="nofollow noreferrer">https://xxxxx.s3.amazonaws.com/6e12e321-adac-42a0-a932-8f345f9dd9c6</a>'
    in</p>
  </blockquote>
  
  <p>How can I modify the timeout for curl with Guzzle?</p>