Adam
Adam

Reputation: 21

Java - Google App engine - Process terminated because the request deadline was exceeded

the requests suddenly stopped and I don't know why this happen. I am using java11.

{"@type":"type.googleapis.com/google.cloud.loadbalancing.type.LoadBalancerLogEntry", "statusDetails":"client_disconnected_before_any_response"}

enter image description here

this my app engine configs

<precompilation-enabled>false</precompilation-enabled>
<sessions-enabled>true</sessions-enabled>
<threadsafe>true</threadsafe> 

<instance-class>F4</instance-class>
<automatic-scaling>
    <max-concurrent-requests>50</max-concurrent-requests>
    <max-pending-latency>8s</max-pending-latency> 
    <min-pending-latency>4s</min-pending-latency> 
    <min-instances>1</min-instances> 
    <min-idle-instances>1</min-idle-instances>
</automatic-scaling>

Upvotes: 0

Views: 180

Answers (1)

Sathi Aiswarya
Sathi Aiswarya

Reputation: 2905

Error you're getting means as per documentation that the client disconnected before load balancer could reply:

client_disconnected_before_any_response - The connection to the client was broken before the load balancer sent any response.

And the Error code 123 is a Deadline Exceeded Error

HARD_REQUEST_TIME_LIMIT- Request exceeded a deadline, causing the instance to shut down

Here are some known issues that cause this issue:

  • High latency, this means that your startup code for instances may take too long, what is recommended in this case is to set a “min_idle_instances” just remember that this might cause an increase in your billing.
  • Running multiple requests in parallel, this can cause a thread deadlock and result in timeouts; in this case it is recommend to use load balancers.

As also mentioned in this stackoverflow Answer by LundinCast

  • You've most likely set your App Engine service scaling element to "autoscaling" (or didn't define it, autoscaling being the default value) in the app.yaml file.
  • Instances in autoscaling have a deadline of 10min, as documented here. You'll need to re-deploy your service with an updated app.yaml file setting the scaling element to "manual scaling" or "basic scaling" to allow your tasks to run to up to 24h.

You might also check this similar cases for more information

how to solve "Process terminated because the request deadline was exceeded. (Error code 123)" in google api?

Google App Engine: Intermittent Issue: Process terminated because the request deadline was exceeded. (Error code 123)

Upvotes: 1

Related Questions