A hack to avoid too many simutaneous opened connections

Alain  12-Apr-2002 10:33 4480 Reads   No comments 
Xtremdj, Xoops France co-webmaster, suggests a little hack in your root footer.php file, to avoid too many simultaneous opened connections on the server...
When you don't close the connection, php let it run for a time out defined by mysql for 30 sec.
Imagine: if 10 visitors are surfing on the site at a great speed , one connection is opened per page, if they open 5 pages in 30 sec (not very much indeed) 50 connections are opened!!!!!
Some hosts jam at 30 simultaneous connections and then you get a beautiful "xxxx as already reached max connections ....."

On the other hand, if you close the db, at each page you close the connection: so only 10 simultaneous connections.
To get this result, get the code at
Xoops France Forums


Rating 0/5
Rating: 0/5 (0 votes)
Voting is disabled!


Who's Online

116 user(s) are online (1 user(s) are browsing Publisher)

Members: 0

Guests: 116



Goal: $100.00
Due Date: Jan 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits