Welcome Guest, Not a member yet? Register   Sign In
SOLVED! - Codeigniter doesn't seems to close database connection??
#1

[eluser]sudesh[/eluser]
I was checking the number of active connections my database was having, saw that all applications using CI has connection and were in sleep (given i was just checking my developer set up, there should be max 1 - given i was the only one using it).

I believe having lot of active connection would hamper my database(I m no expert on it).

Is there a way(or some config setting that i missed) to close connections after the page is completely rendered.
#2

[eluser]Twisted1919[/eluser]
In application/config/database.php find :
Code:
$db['default']['pconnect'] = TRUE;
and set it to
Code:
$db['default']['pconnect'] = FALSE;
#3

[eluser]sudesh[/eluser]
[quote author="Twisted1919" date="1248450346"]In application/config/database.php find :
Code:
$db['default']['pconnect'] = TRUE;
and set it to
Code:
$db['default']['pconnect'] = FALSE;
[/quote]

thx twisted,

it worked. I needed one more thing.

which connection type to use persistent connect or connect(which is more efficient).
#4

[eluser]_Dannoso_[/eluser]
Thanks thanks thanks!
A night spent to fix why forked process collided eachother in db queries even with a new-spanned connection!
And you've solved my problem in 2 seconds!!

Simpler is better!




Theme © iAndrew 2016 - Forum software by © MyBB