# SSL + Large file uploads (3GB+)

**URL:** <https://www.ruby-forum.com/t/ssl-large-file-uploads-3gb/235710>\
**Category:** NGINX\
**Created:** [July 10, 2013, 4:41pm UTC](https://www.ruby-forum.com/t/ssl-large-file-uploads-3gb/235710 "2013-07-10T16:41:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [July 10, 2013, 4:41pm UTC](https://www.ruby-forum.com/t/ssl-large-file-uploads-3gb/235710/1 "2013-07-10T16:41:14Z")

</div>

Hello,

I’m having problems uploading large files (3GB) to a server with SSL  
enabled. I’m using nginx 1.4.2 + passenger. Files around 1GB large work  
fine.

My /tmp mount is large enough to handle files of that size. I guess I’m  
missing something. I read about a SSLRenegBufferSize parameter for the  
apache server - is there a similar directive for nginx that I’m missing?  
I  
appreciate any hints.

My nginx configuration:  
nginx version: nginx/1.4.1  
built by gcc 4.4.5 (Debian 4.4.5-8)  
TLS SNI support enabled  
configure arguments: --prefix=/opt/nginx --with-http\_ssl\_module  
–with-http\_gzip\_static\_module --with-cc-opt=-Wno-error  
–add-module=/usr/local/rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19/ext/nginx

Here is the curl output that I get when trying to post a 3GB+ file:

curl -v -X POST -d @BIG\_TEST\_ARCHIVE\_3.zip [https://shared.com](https://shared.com)

- About to connect() to [shared.com](http://shared.com) port 443 (#0)
- Trying 199.58.85.103…
- connected
- Connected to [shared.com](http://shared.com) (199.58.85.103) port 443 (#0)
- SSLv3, TLS handshake, Client hello (1):
- SSLv3, TLS handshake, Server hello (2):
- SSLv3, TLS handshake, CERT (11):
- SSLv3, TLS handshake, Server key exchange (12):
- SSLv3, TLS handshake, Server finished (14):
- SSLv3, TLS handshake, Client key exchange (16):
- SSLv3, TLS change cipher, Client hello (1):
- SSLv3, TLS handshake, Finished (20):
- SSLv3, TLS change cipher, Client hello (1):
- SSLv3, TLS handshake, Finished (20):
- SSL connection using DHE-RSA-AES256-SHA
- Server certificate:
- subject: OU=Domain Control Validated; [CN=shared.com](http://CN=shared.com)
- start date: 2013-05-06 12:15:19 GMT
- expire date: 2016-05-06 12:15:19 GMT
- subjectAltName: [shared.com](http://shared.com) matched
- issuer: C=US; ST=Arizona; L=Scottsdale; [O=GoDaddy.com](http://O=GoDaddy.com), Inc.;  
OU=[Sign In](http://certificates.godaddy.com/repository); CN=Go Daddy Secure  
Certification Authority; serialNumber=07969287
- SSL certificate verify ok.

> POST / HTTP/1.1  
> User-Agent: curl/7.24.0 (x86\_64-apple-darwin12.0) libcurl/7.24.0  
> OpenSSL/0.9.8x zlib/1.2.5  
> Host: [shared.com](http://shared.com)  
> Accept: _/_  
> Content-Length: 1590530720  
> Content-Type: application/x-www-form-urlencoded  
> Expect: 100-continue

\< HTTP/1.1 100 Continue

- SSL read: error:00000000:lib(0):func(0):reason(0), errno 60
- Closing connection #0  
curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 60

Posted at Nginx Forum:

> **[SSL + Large file uploads (3GB+)](https://forum.nginx.org/read.php?2,240727,240727#msg-240727)**
>
> Hello, I'm having problems uploading large files (3GB) to a server with SSL enabled. I'm using nginx 1.4.2 + passenger. Files around 1GB large work fine. My /tmp mount is large enough to handle files of that size. I guess I'm missing something. I...

---

<div class="post-metadata">

**Author:** ![FSC](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e9c0ed/32.png) [@FSC](https://www.ruby-forum.com/u/FSC)\
**Post date:** [July 10, 2013, 5:26pm UTC](https://www.ruby-forum.com/t/ssl-large-file-uploads-3gb/235710/2 "2013-07-10T17:26:14Z")

</div>

Hello!

On Wed, Jul 10, 2013 at 10:40:49AM -0400, FSC wrote:

> curl -v -X POST -d @BIG\_TEST\_ARCHIVE\_3.zip [https://shared.com](https://shared.com)

[…]

> - SSL read: error:00000000:lib(0):func(0):reason(0), errno 60
> - Closing connection #0  
> curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 60

Provided curl output suggests the problem is in curl, note  
“Content-Length: 1590530720”.

–  
Maxim D.

> **[nginx: donation](http://nginx.org/en/donation.html)**

---

<div class="post-metadata">

**Author:** ![FSC](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e9c0ed/32.png) [@FSC](https://www.ruby-forum.com/u/FSC)\
**Post date:** [July 12, 2013, 12:53pm UTC](https://www.ruby-forum.com/t/ssl-large-file-uploads-3gb/235710/3 "2013-07-12T12:53:43Z")

</div>

At the end of the day the cause was a timeout due to long processing in  
the  
background.

Thanks for having a look anyways!

Posted at Nginx Forum:

> **[Re: SSL + Large file uploads (3GB+)](https://forum.nginx.org/read.php?2,240727,240783#msg-240783)**
>
> Hello, I'm having problems uploading large files (3GB) to a server with SSL enabled. I'm using nginx 1.4.2 + passenger. Files around 1GB large work fine. My /tmp mount is large enough to handle files of that size. I guess I'm missing something. I...
