Reputation: 1005
I am using DBeaver to connect to my MS SQL database hosted in local. I try to export my tables as CSV files. In the case where the query is rather big (40k rows which takes a couple of minutes) the export gets stopped with the message
"SQL Error: The connection is closed".
I kept the default parameters for dbeaver database connection, and my SQL server timeout is the default one (10 minutes, which is more than it takes to trigger the error)
Any idea where it might come from?
Upvotes: 4
Views: 16609
Reputation: 1287
Every database driver allows to configure the connectTimeout
, a parameter that declares for how long the client (dbeaver) will wait before deciding something went wrong.
You can change this parameter right-clicking on the name of the server, choosing Edit Connection
, then clicking on the Driver properties
tab and searching for the connectTimeout
parameter (or something equivalent). Increase the value you found there.
I had this problem with PostgreSQL 13, found a connectTimeout = 20ms and increased it to 200ms to overcome the issue.
An old MySQL driver showed a connectTimeout = 20000
, most probably in nanoseconds.
Upvotes: 2
Reputation: 14228
You know, the value of binary
is extremely large and weight. So that takes much time to transfer via the network. That's the reason why you're getting error. In my opinion,
You should split your query into multiple time to fetch data (How about 1k records in each time).
Just get the exactly items that you need (where condition or the columns that you need instead of all)
Upvotes: 2