-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Multiple instances running on same server interfere with each other #127
Comments
are both servers using the same redis instance? |
Its the same instance with different database/prefix/index. According to the trace log, they're both picking up the correct prefix;
|
According to
|
Looks like redis pub/sub doesn't deal with the database id, rather the pub/sub channels need to be prefixed in order to be distinguished. That means that instead of publishing to "notify_notification", it would be more suitable to publish to "0_notify_notification" or "2_notify_notification", or something distinct from the database id such as NEXTCLOUD_URL. |
@icewind1991 - anything on the horizon for this issue? |
fixes #127 Signed-off-by: Robin Appelman <robin@icewind.nl>
fixes #127 Signed-off-by: Robin Appelman <robin@icewind.nl>
Looks like there is an associated PR (#202) but it's unmerged. Might help if someone feels up to testing it. |
Situation is this;
I have two instances of Nextcloud running on the same physical server on different domain names.
These two instances use a different redis database/index/prefix (or whatever you would like to call it, the dbindex parameter).
I have also set up two instances of notify_push listening on different ports on the same server.
Startup trace on the first instance;
Startup trace on the second instance;
As you can see, instances are listening on different ports, connecting to different nextcloud instances, and using different redis db's.
Apache config, INST 1:
Apache config, INST 2:
When a client connects, it connects to the correct instance of notify_push, and it proceeds to regularly ping the users connected to that instance.
The PROBLEM, however, is that when a message is generated by EITHER instance of Nextcloud, it ends up being received by BOTH instances of notify_push. This is especially a problem when there is username overlap between the two Nextcloud instances, because when a notification is meant for {username}/nc1, it is delivered to both {username}/nc1 and {username}/nc2.
The text was updated successfully, but these errors were encountered: