EllisLab text mark
Advanced Search
     
Persistent connection to database
Posted: 07 January 2011 07:44 AM
Joined: 2010-06-15
9 posts

I eager to hear your thoughts on this, is using “pconnect” to mysql database for an e-commerce website causing problem?

We are hosting our application on Hostgator and this provider only allows 25-50 max_user_connections. These past few days we had some problem where website sometimes just says “database setting is incorrect” during peak hour. Is this a problem causing by persistent connections?

Thanks in advance

 
Posted: 07 January 2011 12:23 PM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1444 posts
cysquan - 07 January 2011 12:44 PM

I eager to hear your thoughts on this, is using “pconnect” to mysql database for an e-commerce website causing problem?

We are hosting our application on Hostgator and this provider only allows 25-50 max_user_connections. These past few days we had some problem where website sometimes just says “database setting is incorrect” during peak hour. Is this a problem causing by persistent connections?

Thanks in advance

I’ve seen where hosts tell you not to use pconnect, and that if you are experiencing problems to turn it off. It’s easy to turn off, so why not turn it off and see what happens?

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 07 January 2011 12:26 PM   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-16
530 posts

I have never seen that error :/
Is it CI error, or a custom error you have created?

Anyway, pconnect should not be causing that kind of trouble imho.

If you have access to PHPMyAdmin _and_ privileges to see Status > Failed attempts to see if this is high…

I do not know what else could be causing this problem? Also, try to ask provider for more insights in this matter.

Cheers,
Smilie

 
Posted: 10 January 2011 02:34 AM   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2011-01-10
3 posts

@cysquan yes I think persistent connection is creating problems in peak hours, it simply give me the following error

————————-
A Database Error Occurred
Unable to connect to your database server using the provided settings.
————————-

while in off peck hours it works flawlessly!

first I thought it was because I’m not using persistent connections unaware of that $db[‘default’][‘pconnect’] in database.php is already set to TRUE.

I’m setting it FALSE now, will post if I get the same issue again!!