How do close the file associated with the DBAL Adapter

34 views Asked by At

I'm trying to avoid a "Too Many Files Open" error when writing to a DBAL cache.

I'm creating the connections via

$cache =  new DoctrineDbalAdapter('sqlite:///' . $fullFilename);

and implementing a LRU cache, but the files appear to remain open. Obviously, I'm hacking here trying to figure out how to close the underlying SQLite database.

$lruCache = $caches[$lru];
$lruCache->reset();
$lruCache = null;
unset($lruCache);
$caches[$lru] = null; // make sure the file is closed
unset($caches[$lru]);

Is there a way to explicitly close it?

0

There are 0 answers