| Author |
Message |
Admin32 Regular


Joined: Sep 14, 2003 Posts: 74
|
Posted:
Fri Oct 24, 2003 2:34 pm |
|
One of the problems I have been dealing with is reaching the Maximum connections allowed to the MYsql database within the hour. This value, currently set to 3600 for each sql user seems to be inadequate.
I would like to know if anyone out there knows of a way one can force a connection to the database to remain open, thus resolving the above problem.
Any ideas or thoughts are always appreciated.
Cheers, |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Wed Nov 05, 2003 7:23 am |
|
A persistent connection is the TYPE of connection you are referring to. Reference this for a complete explanation. You can try this. In includes/sql_layer.php, find this line | Code: | | $dbi=@mysql_connect($host, $user, $password); | and change it to | Code: | | $dbi=@mysql_pconnect($host, $user, $password); | That may or may not help to circumvent the very restricted parameters that your host has set. |
|
|
|
 |
blith Client

Joined: Jul 18, 2003 Posts: 977
|
Posted:
Wed Nov 05, 2003 9:13 am |
|
ooo I had this problem with my host and it was never resolved to my satisfaction and that is why I switched to I haven't looked back since! |
|
|
|
 |
akky Regular


Joined: Feb 18, 2006 Posts: 87
|
Posted:
Wed Mar 29, 2006 3:39 am |
|
I've just noticed this issue and was wondering what sort of errors you would see if the changes we made as you describe above.
Also, there is an option in the config.php file to have persistant connections, are there pros and cons for this.
akky |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Wed Mar 29, 2006 3:47 am |
|
I do not allow pconnects because they can tie your server up real fast. The little extra overhead caused by opening and closing is well worth it in the long run, believe me. |
|
|
|
 |
akky Regular


Joined: Feb 18, 2006 Posts: 87
|
Posted:
Wed Mar 29, 2006 8:23 am |
|
thx for that Raven, i'll leave as is then. |
|
|
|
 |
|
|
|
|