I have an API server built with lumen. When I run load test that swarms the server, at a certain points it throws PDOException: SQLSTATE[HY000] [1040] Too many connections
. I am using a free tier AWS EC2 and RDS setup so I know that my instance is not big enough for this test, but is there any way to optimize this without upgrading the RDS instance first?
My question is: