One particular workspace's schedules page takes too long to load
Earlier it was 3-4 seconds, now upto 10 seconds.
Other workspace's schedule page load as usual 1-2 seconds
but this particular workspace takes too long, I check in chrome network inspector, the api takes too long to finish.
Not sure what is the issue
18 Replies
It's the sql queries taking too long. You can do a sqldump of your jobs relative to your schedules and sent them to us but otherwise we won't be able to investigate
yes it is related to db query only
but only for one workspace, is what surprised me, all other workspace schedule page loads fast
I checked in src, this query is taking time for problematic case and not taking time for non-problematic case.
https://github.com/windmill-labs/windmill/blob/main/backend/windmill-api/src/schedule.rs#L331
GitHub
windmill/backend/windmill-api/src/schedule.rs at main · windmill-la...
Open-source developer platform to turn scripts into workflows and UIs. Open-source alternative to Airplane and Retool. - windmill-labs/windmill
SELECT schedule., t.jobs
FROM schedule, LATERAL ( SELECT ARRAY (SELECT json_build_object('id', id, 'success', success, 'duration_ms', duration_ms) FROM completed_job WHERE
completed_job.schedule_path = schedule.path AND completed_job.workspace_id = 'problem' AND parent_job IS NULL ORDER BY started_at DESC LIMIT 20) AS jobs ) t
WHERE schedule.workspace_id = 'problem'
ORDER BY schedule.edited_at desc LIMIT 50 OFFSET 0;
SELECT schedule., t.jobs
FROM schedule, LATERAL ( SELECT ARRAY (SELECT json_build_object('id', id, 'success', success, 'duration_ms', duration_ms) FROM completed_job WHERE
completed_job.schedule_path = schedule.path AND completed_job.workspace_id = 'no-problem' AND parent_job IS NULL ORDER BY started_at DESC LIMIT 20) AS jobs ) t
WHERE schedule.workspace_id = 'no-problem'
ORDER BY schedule.edited_at desc LIMIT 50 OFFSET 0;
first query takes longer time, second takes less
It's not the query that is the issue, it's the indexing
i ran both directly on postgres container db
which is why we need the sqldump to figure out why the indexing is not used properly
for us to have more info, ideally you can do; EXPLAIN ANALYZE
it will show you the query plan
normally the query should use mostly the index
i might not be able to give the sqldump, acc to company policy
let me share explain analyze plan for both
Thanks, that's all we need right now
Hi just checking if any updates on this as now all workspace are facing this issue
it loads only 2 out of 10 times and takes 10-20 seconds
sometimes gets 504
Yes we solved that long ago normally
What version are you using ?
is it visible on ui anywhere ?
or i need to check on server images ?
Account settings
Windmill CE v1.114.2-13
i should upgrade then ?
any specific steps to follow ?
i am using docker compose method
Yes you're on a very old version
Look at latest docker compose
And adapts yours to it
For more ample customer support, feel free to discuss getting an ee license at sales@windmill.dev
ok will get new version,
I guess i can just do
docker-compose down
, add for windmill container images
and then docker-compose up -d
would update the versions