Subject Idle connection timeout
Author Rudi Feijó
Is there any way to configure idle connection timeout on silent connections?
If its not configurable, can it be done by querying system tables and
deleting idle registers from MON$ATTACHMENTS?



I have a sub-optimal situation in my stack, with php and firebird.



Php with fpm-fastcgi creates a pool of x number of php processes that waits
for connections.

This have a “minimum number of servers” configured, for instance, even if
there are no one using the server, there will always be 5 php processes
opened waiting for connections.

If more php processes are needed the pool will generate them.



The problem is, every time a persistent connection is opened by php, chances
are it will never be closed, because the php process will never close (until
it reaches max_requests and auto recycles, but that’s a pretty long time).



Even if I keep max_requests really low, when server usage is high, the
number of opened idle connections will also be very high, consuming an
amount of RAM that’s unsupportable.



Also, from what I have tested and monitored, php doesn’t seems to be
effectively reutilizing firebird connections which are already opened, it
seems to create more then needed.



Furthermore, in a multi-user environment, we cannot manually close firebird
connections from php – it would kill the whole point of using resusable
persistent connections.



Atenciosamente,

Rudi Feijó


Multidados Informática Ltda.
* (11) 2579-8794 / 2579-8795
* <mailto:ariane.cutlac@...> rudi.feijo@...
* <http://www.multidadosti.com.br/> www.multidadosti.com.br
<http://www.timesheet.com.br/> www.timesheet.com.br





[Non-text portions of this message have been removed]