metabase / metabase

The simplest, fastest way to get business intelligence and analytics to everyone in your company :yum:
https://metabase.com
Other
38.37k stars 5.09k forks source link

Timeout during long queries when SSH tunnel enabled. #29894

Closed Onlinehead closed 1 year ago

Onlinehead commented 1 year ago

Describe the bug Timeout during a long database queries.

Logs

2023-04-07 14:28:18 
   :card-name "*********",

2023-04-07 14:28:18 
   :card-id 7441,

2023-04-07 14:28:18 
   :context :dashboard,

2023-04-07 14:28:18 
  {:executed-by 119,

2023-04-07 14:28:18 
  :info

2023-04-07 14:28:18 
  :middleware {:js-int-to-string? true, :ignore-cached-results? false},

2023-04-07 14:28:18 
  :type :query,

2023-04-07 14:28:18 
 {:constraints {:max-results 10000, :max-results-bare-rows 2000},

2023-04-07 14:28:18 
 :preprocessed

2023-04-07 14:28:18 
 :running_time 0,

2023-04-07 14:28:18 
 :row_count 0,

2023-04-07 14:28:18 
 "DefaultConnectFuture[ec2-user@/44.196.206.5:22]: Failed to get operation result within specified timeout: 30000",

To Reproduce

  1. Run long query over the database which has a SSH tunnel enabled.

Expected behavior Metabase should respect a main database connection timeout.

Screenshots/videos image

paoliniluis commented 1 year ago

I just hit this with DataGrip, so I'm guessing we'll have to do some magic here not to hit this (seems it's not our fault) image

camsaul commented 1 year ago

@paoliniluis, what is the problem exactly? The SSH tunnel has a 30 second timeout or something, and that's getting triggered while the query is still running?

paoliniluis commented 1 year ago

@camsaul i believe that we’re not checking the health of the tunnel so when it gores down we don’t recreate it. The fact that I hit the same bug with DataGrip puzzles me though

luizarakaki commented 1 year ago

We are closing this for now. We tried repro this with our own data warehouse and couldn't get the same behavior. If new evidence appears, we open this again.