I originally posted this on StackOverFlow (T)
And in the Cloud SDK for PHP on GitHub (https://github.com/googleapis/google-cloud-php/issues/6960)
I have an Apache web page (Unbuntu 22 VM) that is loaded hundreds to thousands of times a minute. On every page load, a call via the Cloud SDK for PHP for a single secret from Secret Manager is made. On the ten minute boundaries (:10, :20, etc), many fail with one of four PHP errors:
cURL error 35: error:0A000126:SSL routines::unexpected eof while reading (see [https://curl.haxx.se/libcurl/c/libcurl-errors.html](https://curl.haxx.se/libcurl/c/libcurl-errors.html)) for [https://secretmanager.googleapis.com/v1/projects/20988994674/secrets/prod-frontend-db-app-password/versions/latest:access?%24alt=json%3Benum-encoding%3Dint](https://secretmanager.googleapis.com/v1/projects/20988994674/secrets/prod-frontend-db-app-password/versions/latest:access?%24alt=json%3Benum-encoding%3Dint)
cURL error 55: OpenSSL SSL_write: Broken pipe, errno 32 (see [https://curl.haxx.se/libcurl/c/libcurl-errors.html](https://curl.haxx.se/libcurl/c/libcurl-errors.html)) for [https://secretmanager.googleapis.com/v1/projects/20988994674/secrets/prod-frontend-db-app-password/versions/latest:access?%24alt=json%3Benum-encoding%3Dint](https://secretmanager.googleapis.com/v1/projects/20988994674/secrets/prod-frontend-db-app-password/versions/latest:access?%24alt=json%3Benum-encoding%3Dint)
cURL error 56: OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0 (see [https://curl.haxx.se/libcurl/c/libcurl-errors.html](https://curl.haxx.se/libcurl/c/libcurl-errors.html)) for [https://secretmanager.googleapis.com/v1/projects/20988994674/secrets/prod-frontend-db-app-password/versions/latest:access?%24alt=json%3Benum-encoding%3Dint](https://secretmanager.googleapis.com/v1/projects/20988994674/secrets/prod-frontend-db-app-password/versions/latest:access?%24alt=json%3Benum-encoding%3Dint)
cURL error 56: OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 32 (see [https://curl.haxx.se/libcurl/c/libcurl-errors.html](https://curl.haxx.se/libcurl/c/libcurl-errors.html)) for [https://secretmanager.googleapis.com/v1/projects/20988994674/secrets/prod-frontend-db-app-password/versions/latest:access?%24alt=json%3Benum-encoding%3Dint](https://secretmanager.googleapis.com/v1/projects/20988994674/secrets/prod-frontend-db-app-password/versions/latest:access?%24alt=json%3Benum-encoding%3Dint)
Volume doesn’t seem to matter. I have some examples when not on a ten minute boundary where 2k+ requests work fine. I have examples on the ten minute boundary where it fails with 650 page loads. The issue on the GitHub was closed saying it is a server-side or network error, since the server sent no data.
Here is are some examples from Friday
13:18 :: requests 147 :: cURL error 0
13:19 :: requests 1042 :: cURL error 104
13:20 :: requests 1245 :: cURL error 602
13:21 :: requests 1644 :: cURL error 0
13:22 :: requests 707 :: cURL error 0
13:38 :: requests 136 :: cURL error 0
13:39 :: requests 2005 :: cURL error 0
13:40 :: requests 835 :: cURL error 671
13:41 :: requests 1404 :: cURL error 104
13:42 :: requests 497 :: cURL error 0
13:58 :: requests 116 :: cURL error 0
13:59 :: requests 643 :: cURL error 35
14:00 :: requests 900 :: cURL error 681
14:01 :: requests 1516 :: cURL error 261
14:02 :: requests 938 :: cURL error 0
I don’t see anything related to quotes that should affect this (https://cloud.google.com/secret-manager/quotas#request-rate-quotas). I am only reading the secret value, so that should fall in the access request of 90k per minute. If I was hitting the read request of 600 per minute, I should see errors any time I got over, which I am not.
I have changed the OS level keep-alive as per this (https://cloud.google.com/compute/docs/troubleshooting/general-tips#idle-connections) with no effect.