pomm-project / pomm-bundle

Pomm2 bundle for Symfony
81 stars 31 forks source link

All connections should be closed on shutdown #30

Closed stof closed 9 years ago

stof commented 9 years ago

See the discussion in https://github.com/doctrine/DoctrineBundle/pull/366 for more details, as the reason is the same than for Doctrine connections

chanmix51 commented 9 years ago

Normally, handler connection is closed when the session is wiped from memory by the garbage collector (see here). We did not encounter the connection limit problem during test so far.

stof commented 9 years ago

The point is, the session can stay in memory longer than necessary on shutdown, because the refcounting might not be enough to destruct the Symfony container (and so all services inside it which have been initialized). See https://github.com/symfony/symfony/issues/13448 for a discussion about improving it.