Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.9
Author Message
Admin32
Regular
Regular



Joined: Sep 14, 2003
Posts: 74

PostPosted: Fri Oct 24, 2003 2:34 pm Reply with quote

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,

_________________
___________________
Chris Partsenidis
Founder & Senior Editor
www.Firewall.cx
___________________ 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Nov 05, 2003 7:23 am Reply with quote

A persistent connection is the TYPE of connection you are referring to. Reference this http://us3.php.net/manual/en/function.mysql-pconnect.php 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.
 
View user's profile Send private message
blith
Client



Joined: Jul 18, 2003
Posts: 977

PostPosted: Wed Nov 05, 2003 9:13 am Reply with quote

ooo I had this problem with my host and it was never resolved to my satisfaction and that is why I switched to Only registered users can see links on this board! Get registered or login! I haven't looked back since!
 
View user's profile Send private message Visit poster's website
akky
Regular
Regular



Joined: Feb 18, 2006
Posts: 87

PostPosted: Wed Mar 29, 2006 3:39 am Reply with quote

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
 
View user's profile Send private message
Raven







PostPosted: Wed Mar 29, 2006 3:47 am Reply with quote

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







PostPosted: Wed Mar 29, 2006 8:23 am Reply with quote

thx for that Raven, i'll leave as is then.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.9

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©