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?
Printable View
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?
Could it cause denial of service?
.. 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?