2

I have a server written in Python 3.6, using frameworks flask (1.0.2), and SQLAlchemy (2.4.0). I have some rest calls going out to third-party services such as vision APIs.

I have a few API calls going out RESTfuly (To make sure APIs don't hang them, I've added a timeout as well). Yet After a few API calls the program hangs, it is always at the same point where a google library makes an API call via gRPC.

  1. My initial guess was server hanging because I'm using ORM with eager-loading. Which IMO is not really a good reason, because most of the queries results are not really big for a server to hang.

  2. My second guess is the specific, place server hang pretty much all the time when it was calling a google API, using its own SDK which internally uses, gRPC.

Can gRPC cause issues when it acts as a client and being run behind an (AWS's classic) load balancer? If yes, any procedure to follow to overcome this glitch?

The issue is never faced on the local environment (which has about 8GM RAM and 16GB RAM) for the same data. The program roughly consumes 150MB of memory. On the server which is an AWS manages a couple of instances of elastic-beanstalk (running on an ec2 instance t2.micro 1GB RAM). Behind an AWS classic load balancer.

Dinal24
  • 121
  • 2

0 Answers0