Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29544

Too many conenctions error on AWS-EC2 (Laravel, MySQL) - SQLSTATE[HY000] [1040]

$
0
0

I had a use case of handling 100000 requests per minute & each request consists of 2 MySQL queries. Problem is that the server is able to handle the request(confirmed through the https logs) but unable to process it due to "Too many connections error".

Questions:

  1. If all these requests happen at the same time, will laravel make each connection to MySQL for each request & will terminate the connection(s) only after 2 those queries are being executed?
  2. If laravel does only one connection with MySQL, will laravel execute all those queries(100000*2) one by one (or) do concurrent executions?
  3. If yes for Question 1, should I increase the "Max user connections" for MySQL & increase the necessary hardware (or) Should I contact DB admin?
  4. Is "Internal Dummy Connection" has to do anything with this error since there are around 10000 requests happening per minute(Seen in HTTP logs)?
  5. How to handle this error? (I tried to restart MySQL process alone but I am unable to connect to the server when this error occurred & it is not coming back to the normal state until I restart the whole server)

I am currently struct with this situation, If anyone has an idea about one of these questions alone, Please answer so that it can be a head's up for the remaining ones. Since I am a developer, It will be the last option to go with paid AWS support.


Viewing all articles
Browse latest Browse all 29544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>