CodeIgniter Forums
Persistent connection to database - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Persistent connection to database (/showthread.php?tid=37375)



Persistent connection to database - El Forum - 01-07-2011

[eluser]cysquan[/eluser]
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


Persistent connection to database - El Forum - 01-07-2011

[eluser]skunkbad[/eluser]
[quote author="cysquan" date="1294422247"]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[/quote]

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?


Persistent connection to database - El Forum - 01-07-2011

[eluser]smilie[/eluser]
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


Persistent connection to database - El Forum - 01-10-2011

[eluser]Anupam82[/eluser]
@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!!