Hi,
I've written a network service which implements a tunnel/proxy so that a program running on a user's PC can interact with a device connected via a remote device.
A network server process is created for each active user (i.e. as soon as the user starts the program on his or her PC).
When the network server process starts up, the user's PC sends it some credentials and the identity of the remote device to which the user wishes to connect.
The server process validates those details against a local Postgres database via Rose::DB.
My problem is, what do I need to do in my Perl to get it to fully disconnect from the Postgres database once the validation steps have been completed?
I need to do this because many more users are using this service than originally expected, and thereby causing the Postgres "max_connections" to be exceeded.
Once the user's request has been validated the process has no further need for the database, but it runs until the user terminates the TCP session.
As far as I can tell the Rose::DB->disconnect and Rose::DB->release_dbh don't have any effect on the underlying Postgres connection.
Thanks,
Jeremy Begg