firebase-admin-java
firebase-admin-java copied to clipboard
HttpRequest with 0 write timeout may make program hangs
Firebase Admin Java SDK: v9.2.0
Problem encountered:
When under high traffic, FCM admin SDK will throw some errors like:
Error 1. com.google.firebase.messaging.FirebaseMessagingException: Unexpected HTTP response with status: 408
Error 2. com.google.firebase.messaging.FirebaseMessagingException: Unknown error while making a remote service call: Unexpected end of file from server
Error 3. com.google.firebase.messaging.FirebaseMessagingException: Unknown error while making a remote service call: Connection timed out (Connection timed out)
At the same time, after throwing these errors, FCM admin SDK may still make java program never stop because of FCM admin SDK still waiting response from fcm.googleapis.com
Findings:
FCM admin uses com.google.http-client, which writeTimeout = 0 by default, link
I can't find how ErrorHandlingHttpClient to set writeTimeout, it may be one of result that make program keep waiting response from fcm.googleapis.com under high traffic.
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
I think we also ran into this Issue. Are there any news on this topic?
Sorry for the delay in reply. We are currently investigating this issue. Will update here later.
Any updates here?