Issues with static file download via SSL


This morning we ran into a problem with SSL downloads. The issue
manifests itself when two long running downloads are in progress and
either of the downloads is canceled, which causes the other
connection to be closed. This is best illustrated with a pair of
wgets, the sequence to repeat this is

  1. start wget of large file
  2. start wget of the same file from another host (the download also
    fails when doing two wget’s from the same host)
  3. stop either of the wgets, the other will report 10:14:40 (648.72 KB/
    s) - Connection closed at byte 3538722. Retrying.

The error log reports

2007/11/08 10:14:39 [crit] 25250#0: *35641 SSL_write() failed (SSL:
error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry error:
1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry) while
sending response to client, client:, server:, URL: “/hidden”, host: “

Has anyone experienced this error before?

Nginx version is 5.0.32 +ssl built from macports

SSL version is
xserve5:~ root# openssl version
OpenSSL 0.9.8e 23 Feb 2007