CodeIgniter Forums
Database connection (Fear of overload with session, TRUE or FALSE) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Database connection (Fear of overload with session, TRUE or FALSE) (/thread-2757.html)



Database connection (Fear of overload with session, TRUE or FALSE) - El Forum - 08-22-2007

[eluser]sikkle[/eluser]
Hi there,

i opened this topic to received some opinion from people about how they deal with this.

A lot of people cry everyday about number of connection to database.

I'm wondering this, Code igniter got some libs to help you start, thanks to them indeed.

But the point is, if you use example db_session, indeed each page load you have a connection opened up with the database.

Sometime you have some writing there to keep the session up to date. You add userdata there, sometime last page visited to get the user at the right place.

Is it what we call overload ? does someone operate a barely huge website with something like Session in database ?

Does people cry for nothing there, or it's just EVIL to think it's not sooo awful.


Sorry for the lenght of this post again Smile

thanks.


Database connection (Fear of overload with session, TRUE or FALSE) - El Forum - 08-22-2007

[eluser]Akademik[/eluser]
Well i suppose it depends HOW many connections are actually open at the same time.
I'd have to say that so far i have the impression that PHP doesnt know how to handle DB connections properly, especially persistent ones (these are the most evil ones Tongue)

But as long as your connections count doesnt reach the max connection limit or as long as the connection pool can handle it, im thinking that its not much of a problem. QPS on your DB server might be a bigger one Smile


Database connection (Fear of overload with session, TRUE or FALSE) - El Forum - 08-23-2007

[eluser]sikkle[/eluser]
But i mean, your suppose to choose database session to be sure to be able without any probleme to scale your application.

But i mean, does someone have experience it with high load ?, like the use of db_session, someone operate a website with enough user online to see the damage ?