bug: Pusher build up per-device #2242

Closed
opened 2026-09-13 04:50:43 +00:00 by stratself · 3 comments
Member

What is the bug?

Continuwuity seems to delete pushers when a device logs out (#1614). However, same-device pushers can accumulate over time, most likely due to renewals (i.e. the old ntfy push target expired and the client asks for a new one). Leaving this over time, Continuwuity accumulates a bunch of dead endpoints it pushes to and amplify its sender traffic.

The spec, however, does say that:

A user can have multiple pushers: one per device.

Therefore, I'd like Continuwuity to delete all former pushers of a current device when a new pusher is registered.

Steps to reproduce

  1. Use a client with push support (e.g. Element X Android) for a few months
  2. Query the /_matrix/client/v3/pushers endpoint, sees many more pushers than there are active clients
  3. Reverse proxy logs of push gateway + UnifiedPush servers are also flooded with pusher requests.
  4. Continuwuity logs may be flooded with Could not send request to pusher

Server name and version

26.8.1 (71e101a)

Additional context

The problem is similar to my earlier report, and can be worsened with clientside bugs e.g. low expiry time. Also related to my comments in #805

### What is the bug? Continuwuity seems to delete pushers when a device logs out (#1614). However, same-device pushers can accumulate over time, most likely due to renewals (i.e. the old ntfy push target expired and the client asks for a new one). Leaving this over time, Continuwuity accumulates a bunch of dead endpoints it pushes to and amplify its sender traffic. The spec, however, [does say that](https://spec.matrix.org/v1.19/client-server-api/#push-rules:~:text=A%20user%20can%20have%20multiple%20pushers%3A%20one%20per%20device): > A user can have multiple pushers: one per device. Therefore, I'd like Continuwuity to delete all former pushers of a current device when a new pusher is registered. ### Steps to reproduce 1. Use a client with push support (e.g. Element X Android) for a few months 2. Query the [`/_matrix/client/v3/pushers`](https://spec.matrix.org/v1.19/client-server-api/#get_matrixclientv3pushers) endpoint, sees many more pushers than there are active clients 3. Reverse proxy logs of push gateway + UnifiedPush servers are also flooded with pusher requests. 4. Continuwuity logs may be flooded with `Could not send request to pusher` ### Server name and version 26.8.1 (71e101a) ### Additional context The problem is similar to my [earlier report](https://muoi.me/~stratself/articles/matrix-notifs-xmpp/#old-pushers-build-up), and can be worsened with clientside bugs e.g. low expiry time. Also related to my [comments](https://forgejo.ellis.link/continuwuation/continuwuity/issues/805#issuecomment-26167) in #805
Owner

I'm not convinced this is something the server should do, nor do I see this behaviour being recommended in the spec anywhere. It's explicitly clients' job to clean up pushers, the server only deletes them after devices are removed since the device then can't exactly manage the pushers.
I'd be open to maybe dropping the oldest pusher when reaching a certain limit, but even that sounds sussy

I'm not convinced this is something the server *should* do, nor do I see this behaviour being recommended in the spec anywhere. It's explicitly clients' job to clean up pushers, the server only deletes them after devices are removed since the device then can't exactly manage the pushers. I'd be open to maybe dropping the oldest pusher when reaching a certain limit, but even that sounds sussy
Author
Member

I would be somewhat okay with dropping older pushers (though I wonder how Synapse does it). Will need to find out why clients couldn't clean up after themselves, though.

I would be somewhat okay with dropping older pushers (though I wonder how Synapse does it). Will need to find out why clients couldn't clean up after themselves, though.
Owner

I'm going to close this as invalid because this isn't specced behaviour and is more or less indicative of a client bug.

I'm going to close this as invalid because this isn't specced behaviour and is more or less indicative of a client bug.
nex 2026-09-30 14:48:35 +00:00
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity#2242
No description provided.