SSL_write() failed errors

Maxim Dounin mdounin at
Fri Jul 19 16:59:40 UTC 2019


On Thu, Jul 18, 2019 at 10:03:24AM -0700, Palvelin Postmaster via nginx wrote:

> we’re getting random SSL_write() failed errors on seemingly 
> legitimate requests. The common denominator seems to be they are 
> all for static files (images, js, etc.). 
> Can anyone help me debug the issue?
> Here’s a debug log paste for one incident: 
> Our architecture is: Amazon ALB > Nginx 1.14 > PHP-FPM 7.3

The following debug log:

2019/07/18 19:27:25 [debug] 1840#1840: *2037 SSL_write: -1
2019/07/18 19:27:25 [debug] 1840#1840: *2037 SSL_get_error: 6
2019/07/18 19:27:25 [crit] 1840#1840: *2037 SSL_write() failed (SSL:) while sending response to client...

suggests that this is due to error 6, that is, 
SSL_ERROR_ZERO_RETURN.  This looks strange, as we haven't seen 
this error being returned from SSL_write(), but might be 
legitimate.  In theory this can happen if nginx got a close notify 
SSL alert while writing a response, and probably have something to 
do with Amazon ALB before nginx.

Just in case, could you please provide details about OpenSSL 
library you are using ("nginx -V" should contain enough details)?

Maxim Dounin

More information about the nginx mailing list