Encountering forced logout issues, perhaps related to CACHE or SESSION_ENGINE settings

35 views
Skip to first unread message

Adam Cox

unread,
Feb 24, 2021, 12:36:39 PM2/24/21
to Arches Project
Hi All,

Recently, we've can an issue were Arches users are automatically logged out, generally in the middle of loading the search page.

A few weeks ago I changed from the default CACHE engine that Arches comes with to a database cache, and followed the Django docs for this. Seemed to be working just fine, but it's possible that this caused the issue.

When this forced logout happens, I see this error in e-mail logs:

Report at /mvt/3067ed10-dbaa-11e7-87be-94659cf754d0/8/68/106.pbf
The request's session was deleted before the request completed. The user may have logged out in a concurrent request, for example.

I've tried a number of new settings having to do with sessions.

For example, storing sessions in the file system like this

SESSION_ENGINE = 'django.contrib.sessions.backends.file'
SESSION_FILE_PATH = '/path/to/dir'

does seems to work and create session objects, but eventually the issue returns. I also tried

'django.contrib.sessions.backends.cache'
'django.contrib.sessions.backends.db_cache'

for the session engine but the issue returns.

For now, I've reverted to all Arches defaults (commented out my CACHE and session-related settings), and the problem is gone for the time being.

At any rate, I'm wondering if others have

1) experienced this issue or something like it, or
2) implemented any of these cache and session engine backends that I mentioned without having this issue.

I am also in the middle of a permissions system transition that does require some custom logic in api.MVT(). I'd note however that my code is very very similar to what I see is now in core arches--a db permissions table is interrogated and a list of resource ids is then passed to the SQL call as a where clause during the map tile creation. My work could still be part of the problem though, just not sure at this point.

Thanks,
Adam


Lindsey Gant

unread,
Mar 24, 2021, 7:08:38 PM3/24/21
to Arches Project
Hi Adam,

I wanted to check in to see if you have sorted out a solution to your question above. I know you were questioning if there was a server capacity issue or if there was a problem with your authentication code. Let us know if there is anything we can do to help!

Thanks,
Lindsey
Getty Conservation Institute, Arches
Reply all
Reply to author
Forward
0 new messages