silverstripe / silverstripe-sqlite3

SQLite3 DB Adapter for Silverstripe
BSD 3-Clause "New" or "Revised" License
8 stars 19 forks source link

Too many connections to the database open crashes the site #13

Closed halkyon closed 6 years ago

halkyon commented 9 years ago

Been testing 3.2 with the new version of this sqlite3 module, but getting some problems with too many connections to the database open. This is easily replicated by doing ab with about 10-20 concurrent users, you end up hitting a ulimit on the system and the site crashes.

I had this problem on 1.3.x version of this module, and it was fixed here: https://github.com/silverstripe-labs/silverstripe-sqlite3/commit/fde38341143d5a9fe9edbc7254dc1e8242d75791. Unfortunately the fix doesn't seem to have made it's way (at least not entirely) into the 1.4.x version of this module.

I couldn't find an obvious place to put the dbConn->close() call. Adding a __destruct in SQLite3Connector didn't seem to work. @tractorcow any ideas? :)

tractorcow commented 9 years ago

register_shutdown_function?:P

halkyon commented 9 years ago

That is... an idea :)

dhensby commented 6 years ago

this is 3 years old, I'm going to assume this is no longer an issue as 3.2 isn't supported anymore and there's been no progress on this since then