PDA

Click to See Complete Forum and Search --> : Singleton DB class


xxarmoxx
Nov 16th, 2009, 01:13 AM
What could potentially happen if you don't use a singleton db connection class and there are about 60 to 100 or more connections open at a time?

xxarmoxx
Nov 16th, 2009, 11:51 AM
Could it cause denial of service?

kows
Nov 16th, 2009, 12:59 PM
.. no?

you don't need to create a new database connection every time you query something, you only need to create a database connection for every session or page load. using a singleton class wouldn't prevent this -- not unless you're doing something terribly wrong and actually trying to open a new database connection every time you sent a query to the database (rather than connecting once and then using that connection for every query).

what exactly are you trying to do?