7

I am using pgAdmin to connect remotely to my database as phpPgAdmin is a bit limited in its features. Only problem is if I leave the SQL window open without running a query for a few minutes, then it says I need to reconnect.

Is this a setting I need to change in my database to keep remote connections alive for longer or is it a pgAdmin setting?

Milen A. Radev
  • 60,241
  • 22
  • 105
  • 110
Kevin Orriss
  • 1,012
  • 3
  • 11
  • 24

1 Answers1

3

It is client setting. You need specify connect_timeout in your config file. 29.1. Database Connection Control Functions 29.14. The Connection Service File

Ivan Burlutskiy
  • 1,605
  • 1
  • 12
  • 22
  • I can't find a pg_service.conf file anywhere :( – Kevin Orriss Jun 08 '14 at 08:24
  • Sorry. This config for pgAdmin. You can find sample file in following path: /usr/share/postgresql/9.1/pg_service.conf.sample For PhpPgAdmin most probably the problem is PHP session expiration. Please check settings in your php.ini file: http://www.php.net/manual/en/session.configuration.php Pay attention to session.gc_maxlifetime and session.cookie_lifetime directives. – Ivan Burlutskiy Jun 08 '14 at 08:58
  • I haven't been able to figure this out. Can you specify in the answer where I need to make an edit in order to extend the default connect_timeout setting for a database connection in pgadmin? – Dennis Bauszus Mar 16 '16 at 16:55
  • Please check [automatic logout time](http://stackoverflow.com/questions/11272973/phpmyadmin-automatic-logout-time) this is the similar problem. – Ivan Burlutskiy Mar 16 '16 at 20:15