We have been using
https://github.com/firebase/firebase-admin-java to send FCM notification for several years. I decided to upgrade to Java21 to use virtual threads. I tested a single request to FCM and there was no issue but once I tested with huge load like 1 million request in a single machine, I got errors saying that "Error writing request body to server", "Remote host terminated the handshake", "Unexpected end of file from server". Rarely, I got expected responses. When I decrease the load, unexpected error counts decreases as well. Do you have any idea what causes these errors? Have you ever tried virtual threads in that project?
Thanks a lot.