MYSQL iterator() streaming hangs randomly

https://orm.drizzle.team/docs/select#iterator

I am trying to stream results using the iterator feature. But the iteration seems to hang randomly after some time. Any idea what could be leading to this or if it can be a bug?
const iterator = await db.select().from(users).iterator();
for await (const row of iterator) {
  console.log(row);
  // query another table
}
Was this page helpful?