Session Timeout occurring - REST API

I haven’t seen this error of session timeout until recently. The error I am getting is:

{“message”:“Session timeout”,“code”:3091}

This happens when I am adding rows to my tables. My current settings which I don’t think should be contributing to the timeout values are:

Enable Session Timeout: Inactivity timeout: 300 sec

What has had in my application is that I’ve logged in successfully one time and I’ve added many rows to my tables and also uploaded files.

I don’t know why this is happening and wondered if there are any other considerations of timeout values that I needed to worry about?

Do you send the “user-token” header on all requests after you login?

Yes I do send the user-token that I receive after login API call is issued.

Did you notice if it takes about 5 minutes after the login when you get the timeout error?

I don’t know if it was ~5min. but there was a minute or two before I saw this error.

Thanks, we will try reproducing it.

Hi Roy,

We were unable to reproduce this problem, the feature works as expected - the timeout is extended by the specified time after every invocation. If you could come up with a sample code demonstrating the problem, it would be very helpful.

Regards,
Mark

Have to thrown in some info that I mistakenly omitted. The Enable Session was set to 300 secs but was not enabled when reporting this problem.

That explains it. If you enable it, then the behavior would be as expected.

By not having a session timeout enabled, then wouldn’t the logged in session be infinite in usage?

It is not infinite, should be 1 hour. We’re checking this use-case as well.

Okay so there is 1 hour default session timeout. This time limit is for in activity only?

Yes. it is the same as setting the session duration to 1 hour.

This is good to know since I’ll have to code for this activity.

I will keep an eye on this session timeout, since I’m fairly certain that a user can login and and perform add/deletes , etc. and it doesn’t expire for this 1 hour threshold.

My user logged in at 10:30:40:758 and the last activity was at 11:59:23:732. I had the Enable Session Timeout set to 600 seconds. I then disabled this Session Time out and I immediately get the error:

{“message”:“Not existing user token. Relogin user to update your user token”,“code”:3064}

Can you explain?

When you disable the “Enable Session Timeout” all sessions are invalidated and users must re-login.

Thanks much for the info.

I currently do not have Enable Session Timeout enabled. My user has been currently logged in and adding/deleting data for more than two hours now. I thought the default of 1 hour sessions timeouts would be applied here but so far they are not. Can you shed more light on this subject?

Just like when the sessions are enabled, it is 1 hour after the most recent invocation. Every request within 1 hour extends the life of the session by another hour

Thanks , that does help my understanding now