Edujugon / PushNotification

PHP and Laravel Package to send push notifications to Android and IOS devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Apns not responding and make timeout

ryanpram opened this issue · comments

I'm trying to push notif to 200 devices , but i never get the apns response until make my sistem timeout.
i'm trying to chunk thats 200 device to 100 each chunk. The first chunk is fine and success, but the second one is not responding anything and make timeout again.

Please help me.. thankyou before

@Edujugon please help me

Hi @ryanpram ,

Are you sending the notifications within the request/response life cycle?

Have you tried to move the sending notification action to the queue and log the response to see what's going on?

i have been sending notification action to the queue, and when i tried to send with 200 device token my queue always timeout. when i log the queue , its stuck at send push notif code.
Do I have to divide the task into different queues ? because I chunked it in 1 queue before.

Below code is my push notif code:

$response = $push->setMessage([
'aps' => [
'alert' => [
'title' => $title,
'body' => $message
],
'sound' => 'default',
'badge' => 1,
'target' => $target_url
]
])
->setDevicesToken($registrationIds)
->send()
->getFeedback();

Have you checked if the notifications were delivered even though you didn't get a response?

Now, I'm wondering if the feedback service is the one that stuck, but the notifications go through...