Im trying to stress test mysql:
for($i=0;$i<30000;$i++)
{
mysql_connect("localhost","admin","admin");
mysql_select_db("magic");
mysql_query(INSERT INTO Persons
VALUES (4,'9999999999999999999999999999999999999999999999999999999999999999999999999999999999'));
mysql_close();
}
It only inserts 25985, not more.
Table schema : id = primary int, content = long text
Tt gives me error cannot connect to mysql, even though I increase the max connections.
Any solution would be appreciated 🙂
“The amount of connection is damn to high !” Kidding !
The number of connection is provided by the number of RAM available on your computer. So if you have gygabites of RAM you can have like 10k connections, depend on your system, the RAM allowed to your connection etc.
Check it here : MYSQL : too many connections
Why do you need so much connections at the same time ? One connection and 30.000 insertions should be OK but not 30.000 connections at the same time.
Hope it helps 🙂