Using DBeaver, I'm trying to connect to my AWS ec2 instance where I've installed a MariaDB database.

I've created a new connection as:

  • Connection: AWS / Maria DB
  • Server Host: localhost (because I'm using ssh to connect)
  • Database, Username and Password: the right ones
  • Port: 3306

SSH tunnel on the connection:

  • Use SSH Tunnel: checked
  • Host/IP, Port and User: as suggested by the AWS documentation
  • Auth: Public Key
  • Private key: file .pem (the one I'm also using to connect via ssh from command line)

The connection works great at the beginning. After some minutes of inactivity if I open a table the connection stucks and I need to invalidate/reconnect to fetch the data. This process sometimes is done by DBeaver, after 15 seconds of not fetching anything, but sometimes even if I wait 2 minutes it keeps running but fetching nothing.

Is there something I'm missing in my configuration? Or some configuration on the server maybe.. I don't know..

Have you ever had this problem?

  • 1
    there is in the connection settings a keep alive in dbeaver and the my.conf also has also one
    – nbk
    Nov 2, 2020 at 19:29
  • 1
    @nbk dbeaver ssh keep-alive is set to 0, tunnel connection timeout to 10000. On the ec2 instance in /etc/my.cnf there is nothing useful..
    – Tommy
    Nov 2, 2020 at 20:23
  • 1
    Could it be the SSH Tunnel is "sleeping" during inactivity?
    – J.D.
    Nov 3, 2020 at 0:16
  • 1
    @J.D. it could be, but I don't know how to prevent it from going to sleep or how to wake it up..
    – Tommy
    Nov 4, 2020 at 14:32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.