1

Im having an amazon ec2 instance which has a database connection of maximum 35 connections.I have been running a web application,which was working fine.I was testing codeignitor with tank auth to see how it works.But it made my database inaccessible with too many connections.Tank auth is ussing session to be stored in the database.Is that making too many connections to the database ? Why is this happening.

Piya
  • 1,134
  • 4
  • 22
  • 42
  • this question boils down to: why is the code you are using, doing what that code does? –  Feb 04 '14 at 20:06
  • I have just installed a plain tank auth authentication with code ignitor.And I have created a user account using that.Is this enough for making this much connection to db at a time? – Piya Feb 04 '14 at 20:08

1 Answers1

0

It might not necessarily be because of tank_auth -- it might just be because you are using the db (in other words, this issue might have popped by adding any db functionality at all).

Try setting $db['default']['pconnect'] = FALSE; in the database config. This should explicitly drop the db connection after the page loads.

stormdrain
  • 7,915
  • 4
  • 37
  • 76