The APNS worked fine for various month until few weeks. Every time we send Push Notifications the connection aborts with the following error:
PHP Warning: fwrite(): SSL operation failed with code 1. OpenSSL Error messages: error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry
If I reconnect and resend or only resend the message to the Apple server I get the same error. Sometimes I can send to all devices without any problem. But sometimes it aborts at the 900th device, or at the 2000th device. It's not the I-have-not-collected-the-devices-from-Feedback-service-and-set-all-the-devices-to-inactive-Error. I'm connecting to the Feedback Service at regular intervals. It's another kind of error I don't know. Something has changed with the SSL connection. Can it be that Apple changed something with the SSL connection? Apple said it doesn't. And they doesn't support PHP.
We use PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli) (built: Jun 28 2011 08:24:40). This is the newest stable PHP version for Debian Linux Squeeze. This PHP version uses OpenSSL 0.9.8o (01 Jun 2010) on our server.