Skip to content

Lots of 500s #12

@mipstian

Description

@mipstian

I'm using this library to send notifications in batches. I'm creating a single NotificationPusher instance and then using it to send many batches of 100 devices each (please let me know if this is not how the library is meant to be used). Note that I'm doing batching because I don't want my server to be swamped by the app's reaction to the notification, not because of APNS.

Some batches work fine, returning 100 responses that are either "ok" or "inactive device".

Most batches reply with a single 500 error response, with no body. Judging by the code this happens when the response count doesn't match the token count inside of the pusher: https://github.com/PerfectlySoft/Perfect-Notifications/blob/master/Sources/PerfectNotifications/NotificationPusher.swift#L531. Sounds like this is being handled like an internal consistency "this should never happen" error, but it happens a lot :)

What can I do about that? Because this single 500 replaces all responses, I'm not getting the "inactive device" responses. If I keep sending notifications to those tokens, I risk angering APNS. Please help :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions