-
Notifications
You must be signed in to change notification settings - Fork 325
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
Messaging: Errors with multicast send #507
Comments
This seems to be a known thread-safety issue with httplib2: googleapis/google-cloud-python#1214 Also documented at https://github.com/googleapis/google-api-python-client/blob/master/docs/thread_safety.md Until we figure out a solution, can you try implementing some synchronization logic in your code and see if that helps? |
Related to googleapis/google-api-python-client#1118 |
Same issue
|
I encountered a same issue.
|
For now you will have to synchronize the calls to |
@hiranya911 Can you clarify with giving a little bit more details on your reply? |
send_multicast() calls send_all() to requests multi POST asynchronize. |
Thanks, I use send_multicast() because it might happen that I want to notify same user with different token notification (because of different device) . How topic would solve this particular case scenario in your opinion? @mumu2001 |
@GabrieleCalarota |
It would be best if the SDK created http client for each request :) |
But isn't a send() with a loop is the same (at least semantically) as the send_multicast? I have multiple tokens I want to send a notification to, and this is it. Even if I quite understand your point, I don't get how and why this solves my issue. Also I'm using the send_multicast as a generalized notification process, which is synchronous though. So If I would have to put that loop as a job task or as a futurable |
I think for most developers, putting the You can also try calling |
I am using celery to send multicast messages and get this error in case of concurrent requests :
How can I make the SDK use a connection pool to handle this as well as optimise the number of connections being made to the FCM server? |
I'm closing this assuming #558 has resolved the issue. Happy to take another look if the problem persists even after the fix. |
I still have the issue, which version are you running? |
Describe the problem
From time to time, while sending multicast notification from our app engine application, the following issues are reported, all at the same time:
Steps to reproduce:
The text was updated successfully, but these errors were encountered: