Take the 2-minute tour ×

I have an iPhone application that receives notifications from Apple Push Notification Service. I am using (Easy APNS for PHP) to push the notifications using a Cron job that runs every 15 minutes. I have around 400 devices registered that are using my App.

The Problem: when i want to send a new notification to my users, they receive the notification many times, and it's always the same. I don't know why Apple is sending the same notification many times (like 5 or 6 times)

some extra info:

  • Easy APNS works by fetching 100 messages at a time (like a batch), so i guess that it takes 1 hour to send the 400 messages to all my users.
  • In my apns_messages table, the message has only one entry for each device, so there are no repeated messages in theory. Seems like the same entry is being processed many times.

I can't find the reason why am i receiving the same notification so many times. Also this is annoying for the users.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Ok i found out what happened. The EasyAPNS grabs 100 messages and loops through them. In each loop, y connects to the two Apple Services (push notification service and feedback service). In my server, the firewall was blocking the port for Feedback service making a timeout when trying to connect to it. So php execution crashed, and the message was left as 'queued' when it was already sent. So the same message was being processed many times!

share|improve this answer
-1 - How do you fix that? –  ajbraus Jun 29 at 14:39

Could it be that you are not removing the message from the message table once sent? Easy APNS seems to queue messages in the table apns_messages until ready to be sent. So if they are staying in that table after being send, Easy APNS will see them and send them again.

share|improve this answer
The table has a column named status which is an emum { Queued, delivered, failed}. When EasyAPNS sends the message inmmediately switches it to delivered. –  Herno Oct 17 '12 at 14:55

Your Answer


