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?