Jump to content

Closing mysqli connections?


random1

Recommended Posts

Hi all,

 

I'm using mysqli to handle connections to my database.

 

Each time I reload my page the MySQL 'Aborted_clients' and 'Connections' status variables increment by one.

 

I'm currently trying to close connections using:

 

Connection()->close();
mysqli::close($this->m_Connection);

 

Also should MySQL connections be persistent, one connection allocated to each visitor?

Link to comment
https://forums.phpfreaks.com/topic/128795-closing-mysqli-connections/
Share on other sites

There was a bug in a recent version of php where the cleanup code that should have released the mysqli connection was not. What version of php are you using and it would be to your benefit to check the php bugs to see if your problem has been fixed.

 

Edit: Here are at least two bugs related to what you are experiencing -

 

http://bugs.php.net/bug.php?id=36949

http://bugs.php.net/bug.php?id=37560

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.