Mike, Thanks for the input and good luck with your issue. I have max_execution_time set to 3600 which is an hour. I know the script runs less than two minutes, usually less than one. So not sure if that is my issue, unless you are talking about another factor.
Since this original post I decided to try to batch them in a loop. I connect, gather the tokens, divide by 1000, load them in the queue and send a max of 1000 at a time and then disconnect once after all. I had on fail today on a target count of 955 so it didn't even have to loop. I looked in my php error_log and found this:
[29-Jan-2013 16:00:14 UTC] PHP Fatal error: Uncaught exception 'ApnsPHP_Push_Exception' with message 'No notifications queued to be sent' in /home/qponrevo/public_html/admin/push/ApnsPHP/Push.php:129
Stack trace:
#0 /home/qponrevo/public_html/admin/cron-qbot-push.php(315): ApnsPHP_Push->send()
#1 {main}
thrown in /home/qponrevo/public_html/admin/push/ApnsPHP/Push.php on line 129
Here is that portion of the script in push.php of APNSphp
if (empty($this->_aMessageQueue)) {
throw new ApnsPHP_Push_Exception( // this is line 129
'No notifications queued to be sent'
);
}
I'm not sure what this means. I know the pushes were queued because I received the push. So at least some of them went out. The problem remains that I do not know how many of the 955 went out before it fails.
I'm still looking. Let me know if you find anything. Are you getting any error messages in the log?