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

bobwurtz's avatar

Laravel Connection Issues

Hello,

I have a strange error message that I am not sure how to interpret.

#448 PDOException: SQLSTATE[HY000] [1040] Too many connections in /var/task/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70

I have received this error in the past, but today I started getting dozens of them. As far as I know, most of my users are not having problems. However, I am getting feedback that some users are getting 502 Bad Gateway error messages. These 502 errors are not showing up in my Rollbar or Telescope error reporting. I've also started getting these error messages:

#450 Illuminate\Database\QueryException: SQLSTATE[HY000] [1040] Too many connections (SQL: select count(*) as aggregate from `telescope_entries` where `type` = exception and `family_hash` = b86***)

#451 Illuminate\Database\QueryException: SQLSTATE[HY000] [1040] Too many connections (SQL: select * from `sessions` where `id` = HO1*** limit 1)

My assumption is that they are all related but I don't know. I am running a TALL stack on Vapor. Any insight or comments would be greatly appreciated. Thank you!

0 likes
1 reply
jlrdw's avatar

Make sure you aren't getting a DDoS atack.

1 like

Please or to participate in this conversation.