Report this

What is the reason for this report?

Readfile Fail (SSL Error)

Posted on February 20, 2020

Hi folks,

I regularly have errors logged when trying to link to a file hosted on DO Spaces:

readfile(): Failed to enable crypto

readfile(): SSL: Connection reset by peer

readfile(https://fs1.nyc3.cdn.digitaloceanspaces.com/myfile.exe): failed to open stream: operation failed

Am I doing something incorrectly or are just spaces not reliable?

Thanks!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

The errors you’re seeing appear to be related to issues with the SSL/TLS connection between your application and DigitalOcean Spaces.

“Failed to enable crypto” and “SSL: Connection reset by peer” are typically thrown when there is a problem establishing a secure connection. This can happen due to various reasons such as network connectivity issues, outdated or misconfigured SSL/TLS libraries, or issues on the server side.

Here are some steps to troubleshoot this issue:

  • Update your SSL/TLS libraries: Make sure your system has the latest SSL/TLS libraries. Older versions might have issues with newer protocols or cipher suites used by DigitalOcean.

  • Update PHP and libraries: If you’re using PHP, make sure it’s updated to the latest version. Also, ensure that any libraries or packages your application uses to connect to DigitalOcean Spaces are up-to-date.

  • Server-side issues: If none of the above solutions work, there might be issues on the DigitalOcean side. In this case, you should reach out to DigitalOcean support.

https://docs.digitalocean.com/support/

However, in general, DigitalOcean Spaces is designed to be a reliable object storage solution. If there are any ongoing issues, they are usually quickly addressed by DigitalOcean’s operations team. You can also check DigitalOcean’s status page to see if there are any known issues with Spaces or other services:

https://status.digitalocean.com/

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.