How do I disable "pconnect" in order to stop "database connect failed" message ?

jhiltabidel posted 11th of February 2008 in Community Voice. 12 comments.
My host, inmotionhosting.com suspects pconnect being the problem.  If more than 30 users have this persistent connection to the database, then other connections fail.  That explains why some folks can intermittently connect to my site (including myself!).

Does anyone know how to disable pconnect within Dolphin?  It's not something done on the hosts side.

Thanks,

Joe
 
Comments
·Oldest
·Top
Please login to post a comment.
Hmm, if it's using mysql_pconnect() it should never open more than 2 connections. using said command would check if there is already a connection to the SQL Database and go that route rather than opening more sockets. Check to make sure you have more than just a few at any given time your site has activity. If this is not the case than your host might actually have issues supplying the database for your site.
jhiltabidel
Problem resolved. I wish I could attach a screenshot of the powergrep results I found. For those getting the error message "database connect failed" and a maximum connections message ... you have to change 4 references to "pconnect" in the php files to simply "connect". I haven't had a single database error since and users are successfully signing up. Email me if you want to see the screenshot: jhiltabidel@gmail.com ... I don't have time right now to post details... see more thanks,

joe
Rackhammer
AWESOME! That totally fixed it for me. I wish Boonex had turned it off be default. It totally killed my site for a few months.
jhiltabidel
I'm pretty sure these are the 4 entries that need to be changed. Can any programmers working on this project verify this as a known issue that needs to be addressed?

admin\modules.php (2 entries for pconnect)
inc\db.inc.php (1 entry for pconnect)
modules\phpbb.aemod (1 entry for pconnect)

In each file, find "pconnect" and remove the p (persistent connection). This has resolved my issue! Woo hoo!
aeonprime
I count 11 entries for pconnect in modules/phpbb.aemod. Should I disable all of them?
gnesop
Not working to me. Still get database error report
tvn
Thanks, that did the trick for me too!!
jhiltabidel
I don't think it will have negative impact to modify ALL instances of pconnect -- in fact, powergrep found 11 references for me, too -- but only 4 could I find and modify when I opened the .php files if I recall correctly. I haven't had that error since.
neuquino
the problem with mysql_pconnect is that only works if PHP is installed as a module and this is not the case in many hosting servers. Boonex Team should consider on changing mysql_pconnect to mysql_connect.
bulls121
Thanx work fine 4 me.......
jovix
Thanks jhiltabidel!

I had the same problem, and I could fix it with your advice.
I'm having the same problems but I have a new version and none of those files contain that code.

I really need to fix this.
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.055503845214844