Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SessionExpired after two minutes while iteratoring #428

Open
fatflowers opened this issue May 23, 2024 · 3 comments
Open

SessionExpired after two minutes while iteratoring #428

fatflowers opened this issue May 23, 2024 · 3 comments

Comments

@fatflowers
Copy link

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()
  }
@everpcpc
Copy link
Member

We could check if the await tasks.enqueue(row.values()[0]) got stuck for 2 minutes.

@fatflowers
Copy link
Author

We could check if the await tasks.enqueue(row.values()[0]) got stuck for 2 minutes.

No

but I think we should let the user to determine the SessionExpired duration.

@everpcpc
Copy link
Member

You could try with argument http_handler_result_timeout_secs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants