Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

BillRiess's avatar

SQLSTATE[HY000] [2002] Operation timed out

So I recently upgraded our environment to use ALB and RDS Proxy. The main goal here was to solve the pesky SQLSTATE[HY000] [2002] Connection refused errors from appearing that occur when the Lambda instances get a lot of requests. However, now I'm seeing SQLSTATE[HY000] [2002] Operation timed out pop up in Flare. The error seems to be the same but now the message says "Operation timed out" instead of "Connection refused". This happens very sporadically so it's hard to pinpoint what the problem is.

Is this just the nature of Vapor (Lambda)? Our App is getting about 300k HTTP requests a day.

0 likes
3 replies
BillRiess's avatar

@bradleyjond Unfortunately, no. I was never able to pinpoint the exact issue but we migrated one of our databases to Aurora MySQL 8 which seems to be working better. Not sure if its a resource scaling issue or a different way Aurora is handling the data compared to normal RDS MySQL 8.

bradleyjond's avatar

@BillRiess Darn. We just went through the process of upgrading to Aurora MySQL 8 in hopes that it would solve the problem for us, but it has not. Still on the hunt for how to debug this problem and find a solution.

Please or to participate in this conversation.