Skip to content

SessionExpired after two minutes while iteratoring #428

Description

@fatflowers

Error: APIError: SessionExpired: {"error":{"code":"404","message":"query id 5f097022-84d3-4aff-8d28-36178cf7adf0 not found on pwNrDzROF3SN9EruqMT5t3"}}

the total count of rows of the data I'm iterating is 25000

and the error occured after the program runed for 2 minutes

It seems I don't have a option to determine the lifetime of the connection
And I think the session should not be expired

the code:


  const sql = `SELECT user_id FROM month_active_user_hour WHERE hour = ${hour} ORDER BY user_id`
  const rows = await databendConn.queryIter(sql)

  let row = await rows.next()
  while (row) {
    if (row instanceof Error) {
      ctx.logger.error(row)
      break
    }

    await tasks.enqueue(row.values()[0])

    row = await rows.next()
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions