Query Workflow Block runs sometimes, sometimes fails on schedules

I have this workflow here that keeps failing. It takes in an array of IDs from the retool database and updates them into my own private database. I'm trying to get it to set the specific column values as x for each item in the array. Sometimes it runs, sometimes it fails. The query only says timeout. Any idea what could be causing this?

You can also see that sometimes it runs, sometimes it fails on the left. Some iterations are successful of the block run, but some are not. What could be the cause of this?

Instead of doing a looping update, could you not use a code block to massage the data into a bulk update? Call your dolphin db UPDATE once?

Maybe there are too many updates in the loop and it times out, but sometimes works if quick enough.

How can I 'massage the data' for a bulk update? Sorry, I'm very new to this. I could transform it in python to get an output of an array. Will that work?

Hi @munibsheraz,

Look like you're running into a timeout. To start, are the failure aways happening when the vehicle_id is #1167? Try running a test to see if you can update just that row.

If that doesn't seem to be an issue, try testing a smaller batch size, like 10 ids instead of 25. If you're finding the smaller batch sizes successful, we can try "chunking" this batch and looping through them.