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,
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,
I am a bit stuck with this one, Any help would be greatly appreciated. Thanks in advance. |