I have created eight models in Metabase, and a cron job is set to refresh them every two hours. However, three of these models consistently fail to refresh after ten minutes, displaying the error: "ERROR: canceling statement due to statement timeout." Despite this, when I run the queries manually, they execute in just a few seconds. Has anyone encountered a similar issue or have any ideas on what might be causing this and how to fix it?
It could be that they're all executing at the exact same time causing some sort of transaction lock / the query to take longer than usual. You could try staggering the refresh schedules.