Database Disconnect Error

Note: please leave bug reports and feature requests on

Database Disconnect Error

Postby fallingdown » Mon Aug 27, 2012 7:09 pm

Most of the time I leave my DB management tool, like DBeaver, open on my computer. Sometimes after a long period of time I get an error because the connection has been dropped or reset. Specifically, I get IO Error: Connection reset by peer: socket write error.

So I try to disconnect and reconnect, but when I try to disconnect, DBeaver throws me an error:

Error disconnecting from datasource "XYZ"
Not connected to database

So I'm in a situation where I need to disconnect within DBeaver, but I cannot because I'm not really connected in the first place. It's not a huge deal, since I just need to close DBeaver completely and restart, but it's a bit of an inconvenience. Be nice if DBeaver handled this scenario a little more gracefully. The other solution would be for me to be a little better disciplined and close out my connections when I'm done for the day...but I don't see that happening ;)

Windows 7 Enterprise
DBeaver 1.6.2 32-bit
Oracle 11r1
fallingdown
 
Posts: 41
Joined: Fri Aug 10, 2012 2:43 pm

Re: Database Disconnect Error

Postby Serge » Tue Aug 28, 2012 7:45 am

Hi,

It looks like a bug. BTW usually I just do "Invalidate connection" when connection was broken. But disconnect+connect should work too.

But I can't reproduce problem you described. Are there any messages in error log, probably a stacktrace? Could you provide steps to reproduce?

Thanks!
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Database Disconnect Error

Postby codebling » Fri Nov 02, 2012 8:50 pm

Is it possible to introduce an auto-reconnect feature? I have set auto-reconnect to true in the advanced settings of a MySQL connection, but it doesn't seem to work. This is especially annoying when you've already edited a value, since you have no choice but to discard all of your changes and disconnect in order to connect again.
codebling
 
Posts: 79
Joined: Tue May 22, 2012 4:15 pm

Re: Database Disconnect Error

Postby Serge » Fri Nov 02, 2012 9:23 pm

What about "Invalidate/Reconect" function?
I believe it should help in such situation (it doesn't refresh any client side objects and do not reject changes).

Auto-reconnect is a feature of some JDBC drivers (e.g. MySQL) and it is not very obvious how it actually works (or should work).
Main problem for universal tool is how to determine that connection is actually broken. While it is realtively easy for some drivers, for others it is almost impossible (driver may screen original exception and say something like "internal error while executing statement").
So I think that manual Invalidate operation should be a best solution for this problem.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Database Disconnect Error

Postby codebling » Fri Nov 02, 2012 10:14 pm

codebling
 
Posts: 79
Joined: Tue May 22, 2012 4:15 pm

Re: Database Disconnect Error

Postby codebling » Fri Nov 02, 2012 10:35 pm

If invalidate/reconnect is implemented, it could be an option on the 'Data error' dialog, e.g. in addition to the 'OK' and 'Details' buttons, an 'reconnect&retry' button
codebling
 
Posts: 79
Joined: Tue May 22, 2012 4:15 pm

Re: Database Disconnect Error

Postby Serge » Sat Nov 03, 2012 2:31 pm

Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb


Return to Support



Who is online

Users browsing this forum: Google [Bot] and 31 guests