Couple f days ago we updated from v45..3 to v46.1 and after that we are getting timeout errors while refreshing scheduled data models. Same timeout error when refreshing manually.
Where could we change timeout settings? It was working absolutely fine on older Metabase version.
I was not able to find any timeout settings in admin settings anywhere.
[13ac4ca6-6e74-4265-a91d-b73ba534abdb] 2023-04-13T08:36:52+03:00 INFO metabase.task.persist-refresh Attempting to refresh persisted model 961.
[13ac4ca6-6e74-4265-a91d-b73ba534abdb] 2023-04-13T08:36:52+03:00 INFO metabase.driver.mysql You may need to add trustServerCertificate=true to the additional connection options to connect with SSL.
[13ac4ca6-6e74-4265-a91d-b73ba534abdb] 2023-04-13T08:37:22+03:00 INFO metabase.task.persist-refresh Error refreshing persisting model with card-id 961
java.lang.Exception: Killed mysql process id 3,744,965 due to timeout.
at metabase.driver.mysql.ddl$kill.invokeStatic(ddl.clj:43)
at metabase.driver.mysql.ddl$kill.invoke(ddl.clj:34)
at metabase.driver.mysql.ddl$execute_with_timeout_BANG_.invokeStatic(ddl.clj:56)
at metabase.driver.mysql.ddl$execute_with_timeout_BANG_.invoke(ddl.clj:45)
at metabase.driver.mysql.ddl$fn__103041.invokeStatic(ddl.clj:69)
at metabase.driver.mysql.ddl$fn__103041.invoke(ddl.clj:62)
at clojure.lang.MultiFn.invoke(MultiFn.java:244)
at metabase.task.persist_refresh$reify__79259.refresh_BANG_(persist_refresh.clj:65)
at metabase.task.persist_refresh$refresh_with_stats_BANG_$fn__79262.invoke(persist_refresh.clj:85)
at metabase.task.persist_refresh$refresh_with_stats_BANG_.invokeStatic(persist_refresh.clj:84)
at metabase.task.persist_refresh$refresh_with_stats_BANG_.invoke(persist_refresh.clj:69)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:673)
at clojure.core$partial$fn__5914.doInvoke(core.clj:2660)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at metabase.task.persist_refresh$save_task_history_BANG_.invokeStatic(persist_refresh.clj:108)
at metabase.task.persist_refresh$save_task_history_BANG_.invoke(persist_refresh.clj:103)
at metabase.task.persist_refresh$refresh_individual_BANG_.invokeStatic(persist_refresh.clj:222)
at metabase.task.persist_refresh$refresh_individual_BANG_.invoke(persist_refresh.clj:214)
at metabase.task.persist_refresh$refresh_job_fn_BANG_.invokeStatic(persist_refresh.clj:239)
at metabase.task.persist_refresh$refresh_job_fn_BANG_.invoke(persist_refresh.clj:233)
at metabase.task.persist_refresh.PersistenceRefresh.execute(persist_refresh.clj:249)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
[13ac4ca6-6e74-4265-a91d-b73ba534abdb] 2023-04-13T08:37:23+03:00 INFO metabase.task.persist-refresh Finished updated model-id 961 from persisted-info 41.```
That is the point, that some of the queries runs for no more than 30 seconds, but still getting timeout error. Those run without any issues in Metabase without trying to rebuilt cache.
I am not sure i understand. What i am asking is if queries to that particular DB are running or not form metabase ... To exclude if it's something coming from that model or simply a DB connection issue
That is definitely not related to any DB settings, since simple SQL questions could be run without such an issue.
There might be some changes either in Data model behavior or some settings for it in the background.
As I said: before upgrade we did not have those issues before.
Can you increase the timeout in MySQL? Also, how much time do those queries take when run directly in a sql client? We need more context to reproduce this
We don’t have still a way to reproduce this issue:
-which MySQL version are you using?
-which configuration does that MySQL have?
-how big is the model and how much time does the run take?
If we can’t get all the info needed to reproduce is like shooting in the dark
Our mysql version is 5.5.50-log.
Database is a slave from a master/slave config. Size is 100Gb, metabase is connected to the slave.
Cache database (with models) size is 1Gb.
Models take 3 to 4min to run on 0.45.3.1.
About mysql configuration, do you have specific questions ?