#302 Postfixadmin don't close idle connections with postgresql

v2.3.6
open
nobody
None
5
2013-12-01
2013-09-26
Chris
No

All in the title. When you use posftixadmin with postgresql , postfixadmin open a new connection with each request and never close it.

////////////////////////////////////////////////////////////////////////////////////////
postgres 25200 0.0 0.0 591372 7028 ? Ss 16:26 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43217) idle
postgres 25210 0.0 0.0 591372 6868 ? Ss 16:27 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43218) idle
postgres 25213 0.0 0.0 591364 6968 ? Ss 16:27 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43219) idle
postgres 25215 0.0 0.0 591372 6868 ? Ss 16:27 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43220) idle
postgres 25216 0.0 0.0 591372 6872 ? Ss 16:27 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43221) idle
postgres 25218 0.0 0.0 591372 6872 ? Ss 16:27 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43222) idle
postgres 25226 0.0 0.0 591300 6800 ? Ss 16:28 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43223) idle
postgres 25234 0.0 0.0 591372 6860 ? Ss 16:28 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43227) idle
postfix 25236 0.0 0.0 39860 2348 ? S 16:28 0:00 pickup -l -t fifo -u -c
postgres 25238 0.0 0.0 591300 7064 ? Ss 16:28 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43228) idle
postgres 25247 0.0 0.0 591300 7064 ? Ss 16:29 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43229) idle
postgres 25253 0.0 0.0 591300 6804 ? Ss 16:29 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43231) idle
postgres 25256 0.0 0.0 591300 7060 ? Ss 16:29 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43232) idle
postgres 25262 0.0 0.0 591300 7056 ? Ss 16:30 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43233) idle
postgres 25266 0.0 0.0 591300 7056 ? Ss 16:30 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43234) idle
postgres 25268 0.0 0.0 591300 6804 ? Ss 16:30 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43235) idle
postgres 25270 0.0 0.0 591300 6796 ? Ss 16:30 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43236) idle
postgres 25271 0.0 0.0 591300 7060 ? Ss 16:30 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43237) idle
postgres 25274 0.0 0.0 591300 7064 ? Ss 16:30 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43238) idle
postgres 25283 0.0 0.0 591300 6800 ? Ss 16:31 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43239) idle
postgres 25286 0.0 0.0 591300 6808 ? Ss 16:31 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43240) idle
postgres 25289 0.0 0.0 591300 6804 ? Ss 16:31 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43241) idle
postgres 25291 0.0 0.0 591300 6808 ? Ss 16:31 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43242) idle
postgres 25294 0.0 0.0 591300 6812 ? Ss 16:31 0:00 postgres: postfixadmin postfixadmin 127.0.0.1(43243) idle

Discussion

  • GingerDog

    GingerDog - 2013-09-26

    I'd be tempted to reconfigure Apache to tell it to kill off the child processes quicker/soon (MaxRequests) ... I suspect the real solution is to explicitly close postgresql connections - but that may be difficult to do.

     
  • Christian Boltz

    Christian Boltz - 2013-12-01

    A quick test indicates that using a destructor (for example in the Config class) could work. However, the database connection is stored as "static $link" inside db_query - we'd need to make it somehow global to be able to close the connection.

    So yes, in theory it should be possible, but it needs quite some work.

    In the meantime, please try changing "pgsql.allow_persistent" and/or "pgsql.auto_reset_persistent" in php.ini and report back if it helps.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks