Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync mode and client timeouts issue #422

Closed
HelmiRifai opened this issue Sep 11, 2019 · 4 comments · Fixed by #431
Closed

Sync mode and client timeouts issue #422

HelmiRifai opened this issue Sep 11, 2019 · 4 comments · Fixed by #431
Labels

Comments

@HelmiRifai
Copy link
Contributor

All our clients are sending notifications in sync mode, but from my understanding of the code sync is still using the internal "queue" to send out the notification with the addition of the waitgroup to notify the client of the resulting status.

Our issue is that under high load and with a client timeout of 60-120s we see increase in internal queues and if the notification remains in the queue for 120+ seconds the client will timeout; then the notification could still be sent to the device. This is a rarer case ( estimated at 1%) and we have worked around it mainly by backoff on the workers and scaling of the gorush deployment.

Let me know if this makes sense based on the code and if you point me to what can be modified to handle a client timeout ( or disconnect) better I would be happy to work on it.

@HelmiRifai
Copy link
Contributor Author

@appleboy appreciate any input and willing to work on a solution for this

@appleboy
Copy link
Owner

appleboy commented Sep 23, 2019

I will take this issue and let me think about this cause. The solution is Gorush will remove the notification from the queue if the timeout has been reached.

@appleboy
Copy link
Owner

appleboy commented Oct 16, 2019

@HelmiRifai The notification will not be sent after the client disconnected Gorush server if the notification in the queue list. I will send the PR to implement the feature tomorrow.

@appleboy
Copy link
Owner

@HelmiRifai You can see the PR #431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants