A hack to avoid too many simutaneous opened connections

Date 2002/4/12 10:36:22 | Topic: XOOPS

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

Enjoy...


This article comes from XOOPS Web Application System
https://xoops.org

The URL for this story is:
https://xoops.org/modules/news/article.php?storyid=224