Skip to content

Error when sending large chunks of data over a secure TLS connection with older PHP versions #105

Closed
@clue

Description

@clue

Originally reported here: reactphp/stream#64

This can actually easily be reproduced by sending a "large" chunk of data at once over a TLS connection. On my system, this appears to be anything larger than around 30 KB at once passed to the underlying fwrite() call.

error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry

This is actually a bug in PHP that has been reported via https://bugs.php.net/bug.php?id=72333. The bug has been present for years and has been fixed recently via php/php-src@17e9fc9 which landed in 7.1.4 and 7.0.18.

I've played around with different buffers and write chunks and it looks like this can be worked around by limiting the write chunk size to anything smaller than around 8 KB.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions