Closed Nicasso closed 4 months ago
Thank you for bringing this up! Unfortunately, this doesn't sound familiar, at least to me, and everything I can find related to a cURL Error 35 and SSL_ERROR_SYSCALL
is related to outdated versions of cURL, problems with proxies or the server receiving the requests.
But I assume you came to the same conclusion and have checked https://firebase-php.readthedocs.io/en/latest/troubleshooting.html#curl-error-xx as well.
Since the deprecated endpoint was able to receive 500 messages with one request, and the new method requires 500 requests, it sounds reasonable that messages take longer and are more prone to errors, but I, of course understand that this answer is not satisfactory 😅.
I remember having seen someone talk about HTTP/2 in the context of the SDK in the past, but I can't seem to find it. I'm not too familiar with it, and I don't know if Guzzle actually supports HTTP/2, but let me know if #874 improves the situation.
Try to update curl. I have same problem and update from 7.81 to 7.88.1 (build from source on ubuntu 22.04) and this fix problem
Try to update curl. I have same problem and update from 7.81 to 7.88.1 (build from source on ubuntu 22.04) and this fix problem
Are you using the branch with http2 enable? We were having issues with "Unable to connect to the API: cURL error 52: Empty reply from server" and using #874 branch seems to have fixed the issue. Still using curl (7.74.0-1.3)
Ah, after three weeks, some feedback on that PR 🥳. I'll merge and release it, then.
It took a little more time than expected, but in return, sending many messages will take considerably less time going forward. I'll release #874 in the next days.
Released with https://github.com/kreait/firebase-php/releases/tag/7.10.0 🚀
Describe the bug
Since Google is deprecating the Batch Send API starting 6/21/2024, you've rewritten the
sendMulticast
logic to use their recommended standard HTTP v1 API send method (https://firebase.google.com/support/faq#fcm-23-deprecation). So far so good. However, since upgrading this package and thus starting to use this logic I experience issues when passing large batches of 500 device tokens to thesendMulticast
function. The outcome is that from the 500 sends less than 10 will actually succeed. Most will return the following error:Unable to connect to the API: cURL error 35: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to fcm.googleapis.com:443 (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://fcm.googleapis.com/v1/projects/xxxxx/messages:send
Lowering the amount of device tokens that I pass to the
sendMulticast
function to 50 seems to have resolved the issue. However, spreading the device tokens into smaller batches does increase the execution time quite a bit. So I'm curious, does this situation sound familiair? Is there some kind of limit I am unaware of regarding the amount of device tokens I can pass each time I call thesendMulticast
function?Installed packages
PHP version and extensions
Steps to reproduce the issue.
Just run the sendMulticast with and pass it an array of 500 device tokens. Something in the lines of:
Error message/Stack trace
Additional information
No response