{"action":"created","issue":{"url":"https://api.github.com/repos/rackspace/php-opencloud/issues/501","labels_url":"https://api.github.com/repos/rackspace/php-opencloud/issues/501/labels{/name}","comments_url":"https://api.github.com/repos/rackspace/php-opencloud/issues/501/comments","events_url":"https://api.github.com/repos/rackspace/php-opencloud/issues/501/events","html_url":"https://github.com/rackspace/php-opencloud/issues/501","id":51971123,"number":501,"title":"SSL Read Error when uploading to Rackspace CloudFiles","user":{"login":"mrpdean","id":4626255,"avatar_url":"https://avatars.githubusercontent.com/u/4626255?v=3","gravatar_id":"","url":"https://api.github.com/users/mrpdean","html_url":"https://github.com/mrpdean","followers_url":"https://api.github.com/users/mrpdean/followers","following_url":"https://api.github.com/users/mrpdean/following{/other_user}","gists_url":"https://api.github.com/users/mrpdean/gists{/gist_id}","starred_url":"https://api.github.com/users/mrpdean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrpdean/subscriptions","organizations_url":"https://api.github.com/users/mrpdean/orgs","repos_url":"https://api.github.com/users/mrpdean/repos","events_url":"https://api.github.com/users/mrpdean/events{/privacy}","received_events_url":"https://api.github.com/users/mrpdean/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2014-12-15T10:39:25Z","updated_at":"2015-01-02T11:36:44Z","closed_at":null,"body":"Hi,\r\n\r\nI've run into a strange error when I try to upload numerous images (as part of a data import process) to Rackspace CloudFiles.\r\n\r\n[Guzzle\\Http\\Exception\\CurlException]\r\n  [curl] 56: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 [url] https://storage101.syd2.clouddrive.com/v1/MossoCloudFS_8c3cef2b-4915-4d8e\r\n  -8c39-4633425e3bee/vc-sandbox/atdw/0001/01/thumb_86_atdw_small.jpeg\r\n\r\nWhen I ran the process from my local PC it worked (though it was slow) however when I run the same process on our Rackspace Cloud server I get that error.\r\n\r\nThe error appears about a quarter of the way through the process so I was thinking it might be some sort of rate limit, however the exception message doesn't really provide any hints to that affect.\r\n\r\nAny help would be most appreciated.\r\n\r\nThanks\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rackspace/php-opencloud/issues/comments/68521132","html_url":"https://github.com/rackspace/php-opencloud/issues/501#issuecomment-68521132","issue_url":"https://api.github.com/repos/rackspace/php-opencloud/issues/501","id":68521132,"user":{"login":"jamiehannaford","id":1867202,"avatar_url":"https://avatars.githubusercontent.com/u/1867202?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiehannaford","html_url":"https://github.com/jamiehannaford","followers_url":"https://api.github.com/users/jamiehannaford/followers","following_url":"https://api.github.com/users/jamiehannaford/following{/other_user}","gists_url":"https://api.github.com/users/jamiehannaford/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiehannaford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiehannaford/subscriptions","organizations_url":"https://api.github.com/users/jamiehannaford/orgs","repos_url":"https://api.github.com/users/jamiehannaford/repos","events_url":"https://api.github.com/users/jamiehannaford/events{/privacy}","received_events_url":"https://api.github.com/users/jamiehannaford/received_events","type":"User","site_admin":false},"created_at":"2015-01-02T11:36:44Z","updated_at":"2015-01-02T11:36:44Z","body":"@mrpdean Unfortunately I don't think there's a silver bullet to an issue like this. There are various things you can do to suppress or mitigate the SSL errors, but each has its own drawbacks:\r\n\r\n1. Disable SSL verification like this:\r\n\r\n```php\r\n'curl.options' => array(\r\n   CURLOPT_SSL_VERIFYHOST => false, \r\n   CURLOPT_SSL_VERIFYPEER, false\r\n)\r\n```\r\n\r\nI recommend against doing this, though - because it undermines the effectiveness of secure transport, which is the entire point of HTTPS. However if you're desperate and trust the source, it might be a suitable workaround.\r\n\r\nYou might also want to experiment with the `ssl.certificate_authority` option as documented [here](https://github.com/guzzle/guzzle3/blob/master/docs/http-client/client.rst#configuration-options).\r\n\r\n2. Upgrade your cURL install. You mention you're running v7.35, but the latest version is v7.39. I read somewhere recently that a few bugs were introduced into recent Ubuntu images with cURL, so upgrading might help.\r\n\r\n3. Implement a retry policy, which resends connections that have resulted in a particular error. For example, you can tell Guzzle (the underlying HTTP library) to retry connections that have resulted in a particular HTTP status (403 Forbidden, etc.) or a particular cURL error code (56 SSL read in your case). To do this, use the code here: https://gist.github.com/jamiehannaford/8432889"}}