```024-06-18T10:28:13+02:00 [SLOW-OP] ory-session ...
# ory-network
a
Copy code
024-06-18T10:28:13+02:00 [SLOW-OP] ory-session took 90133ms to complete! 
2024-06-18T10:28:24+02:00 [SLOW-OP] ory-session took 87932ms to complete! 
2024-06-18T10:28:30+02:00 [SLOW-OP] ory-session took 85752ms to complete! 
2024-06-18T10:28:38+02:00 [SLOW-OP] ory-session took 83784ms to complete! 
2024-06-18T10:28:38+02:00 [SLOW-OP] ory-session took 83645ms to complete! 
2024-06-18T10:28:39+02:00 [SLOW-OP] ory-session took 83437ms to complete! 
2024-06-18T10:29:10+02:00 [SLOW-OP] ory-session took 76455ms to complete! 
2024-06-18T10:29:14+02:00 [SLOW-OP] ory-session took 76137ms to complete! 
2024-06-18T10:29:18+02:00 [SLOW-OP] ory-session took 75740ms to complete! 
2024-06-18T10:29:20+02:00 [SLOW-OP] ory-session took 76135ms to complete! 
2024-06-18T10:29:25+02:00 [SLOW-OP] ory-session took 76761ms to complete!
We are using ory edge sessions but are seeing some calls take up to a minute before failing, so we implemented a timeout of 1 second on the axios request (node library)
Copy code
const cookie = request.headers.get('Cookie') || undefined
    session = (
      await orySdk.toSession(
        { cookie },
        {
          timeout: 1000
        }
      )
    ).data
h
Are you using the session extend functionality?
a
uhm not sure, where can I check?
not from the code at least, not on purpose
this is all we do
Copy code
const userSessionOperation = new Date()

  let session: Session | undefined = undefined
  try {
    const cookie = request.headers.get('Cookie') || undefined
    session = (
      await orySdk.toSession(
        { cookie },
        {
          timeout: 1000
        }
      )
    ).data

    timeOperation('ory-session', userSessionOperation)
  } catch (error: any) {
    const responseData = error.response?.data || {}
    if (responseData.redirect_browser_to && !skipRedirect) {
      throw redirect(responseData.redirect_browser_to)
    }
  }

  return session
the timeout we added because of the issues we had with calls not timing out
h
maxroll correct?
a
yes correct
any updates?
@high-optician-2097 sorry for the ping but it would be valuable to know
s
do you still see those long latecies?
a
not so much anymore, did you find anything on your end ?
h
No, the feature was also not yet rolled out