Get Random Rows by Value, Number of Rows error

i have a flow with the ‘Get Random Rows by Value’ block & it checks for rows with the right value in
a column but here’s the thing, when setting the Number of Rows to something equal or below how many in the database match, it works fine as far as i can tell but when setting it above, like 5 when only 3 rows have the value under the column, it runs for as long as it can, then says error in Analytics & when using traces doesn’t make a link under trace id. hopefully this makes enough sense.

You’re most likely hitting the time limit on flow executions. I’ve just tested this with only a Realtime Log block inside the loop and it seemed to work fine. Try making the limit 1 and then seeing which blocks are taking the longest and removing those if possible.

This is not a solution. I’ve disabled every single inside the loop & it still results in an error. I know it’s hitting the time limit for the flow but it doesn’t make sense as setting it to 2 when there’s 2 rows that match works fine & finishes in just a few seconds but when just going slightly over to 3 when only 2 rows match causes it too keep running until the full 30 seconds is up.
Flow for context if you need it: https://inventor.gg/dash/share/component/b9860951fdea4feaac09d68dcf316b66

update:
not 100% sure but might only happen when there’s at least 1 row that matches.
for example (matches | input number = result)
0 | 4 = fine
1 | 3 = error
2 | 2 = fine
3 | 1 = fine

Gotcha, I failed at reading your message lol. That would definitely be an issue

1 Like