0

I have been testing my web application with a load of 250 simultaneous users. But i am getting a database error -

A Database Error has occured Unable to connect to the database with the following settings filename: core/loader.php

I have no idea about the reason the database goes down like this?

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
sunshine
  • 371
  • 1
  • 4
  • 18
  • 1
    probably you have too many concurrent database connections. check your DB configurations see also [the manual](https://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html) (but disregard the outdated PHP-code-examples using the mysql_-functions) – Franz Gleichmann Oct 20 '16 at 11:05

1 Answers1

1

It sounds like you have hit the MySQL connection limit:

Add the line below to the bottom of your my.cnf and restart MySQL

max_connections = 250

You'll need to tweak this value to suit your server best - see What does max_connections really mean? and the docs for more details on how to pick this value - but 250 should be fine for your testing

Community
  • 1
  • 1
JBithell
  • 627
  • 2
  • 11
  • 27