appengine-java-standard icon indicating copy to clipboard operation
appengine-java-standard copied to clipboard

HTTPConnector mode: Servlet session datastore.put() call to save the session is flaky

Open ludoch opened this issue 1 year ago • 1 comments

Sometimes, when servlet sessions are enabled, the app gets an error in the like:

com.google.apphosting.api.ApiProxy$CancelledException: The API call datastore_v3.Put() was explicitly cancelled. at com.google.apphosting.utils.runtime.ApiProxyUtils.convertApiError(ApiProxyUtils.java:75) at com.google.apphosting.utils.runtime.ApiProxyUtils.getApiError(ApiProxyUtils.java:202) at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:691) at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:588) at com.google.apphosting.runtime.http.HttpApiHostClient.receivedResponse(HttpApiHostClient.java:296) at com.google.apphosting.runtime.http.JettyHttpApiHostClient$Listener.onComplete(JettyHttpApiHostClient.java:206) at

It seems related to a possible flake in the API server backend, having a race condition between the close statement of the HTTP request and the API request, and when the API is really called, the API ticket is null, and it should not be null.

ludoch avatar Sep 27 '24 16:09 ludoch

Possible code change on java side https://github.com/GoogleCloudPlatform/appengine-java-standard/pull/278 does not seems enough. Looking at C++ server side now.

ludoch avatar Sep 27 '24 16:09 ludoch

C++ code is now in experiment mode. ETA: 3 weeks to full prod.

ludoch avatar Mar 07 '25 00:03 ludoch

C++ code is now in experiment mode. ETA: 3 weeks to full prod.

Ready to test when it's deployed

AoSteven avatar Mar 26 '25 17:03 AoSteven

Thanks! Prod push is taking longer due to other internal constraints like a prod being frozen preparing Cloud Next conference. I will ping this bug when fully deployed.

ludoch avatar Mar 26 '25 17:03 ludoch

Code is now is prod. Let us know if you still see some issues.

ludoch avatar Apr 25 '25 17:04 ludoch