502 error in GAE flex. when sending requests from JMeter

73 views
Skip to first unread message

Karikalan Kumaresan

unread,
Aug 21, 2017, 12:08:50 PM8/21/17
to Google App Engine

I have deployed a simple Spring boot app in Google App Engine Flexible. The app. has two APIs, one to add the user data into the DB (xxx.appspot.com/add) the other to get all the user data from the DB (xxx.appspot.com/all), it connects to the Cloud SQL MySQL instance.

I wanted to see how GAE scales for the load, hence used JMeter to create a load with 100 user concurrency ramped up in 100 seconds which calls these two APIs in half a second delay, forever. While it runs fine for sometime (with just one instance), it starts to fail after 30 seconds or so with a "java.net.SocketException" or "The server responded with a status of 502".

After this error, when I try to access the same API from the browser, it displays,

Error: Server Error

The server encountered a temporary error and could not complete your request. Please try again in 30 seconds.

The service is back to normal after 30 mins or so, and whenever the load test happens it repeats the same behavior as mentioned above. I expect GAE to auto-scale based on the load coming in to handle it without any down time (using multiple instances), instead it just crashes or blocks the service (without any information in the log). My app.yaml configuration is,

runtime: java
env: flex
service: hello-service
automatic_scaling:
  min_num_instances: 1
  max_num_instances: 10

I am a bit stuck with this one, Any help would be greatly appreciated. Thanks in advance.

I tried with manual_scaling with one instance, and it works fine. 

Shivam(Google Cloud Support)

unread,
Aug 21, 2017, 5:18:37 PM8/21/17
to Google App Engine
Google Groups discussion forum is meant for open-ended discussions. This requires technical support, so posting on stack overflow is recommended. However, I can notice that you already posted there.
Reply all
Reply to author
Forward
0 new messages