Hi Josselin,

what we usually do is to tune the solution on the client and for specific page in order to not impact the overal session mechanism for all the apps and services hosted by the service.

Whenever it's needed we add a small JS snippet like [1] to keep the page alive. Just provide an endpoint responding with 200 OK as "/application/ajax/heartbeat" in the example and you are ready to go.

Hope it's useful.

M.

[1]
  window.setInterval(()=>{
    fetch("/application/ajax/heartbeat").then(
      console.log("keep alive")
    )
  }, 60000)


On 02/07/21 18:02, Christian Grün wrote:
Dear Josselin,

For the management of the users and the permissions, we relied on the BaseX doc 
(https://docs.basex.org/wiki/Permissions).
If you are storing users in sessions, you can increase the session
timeout by adding the following entry in the web.xml file:

<web-app ...>
   <!-- Increase timeout to 8 hours -->
   <session-config>
     <session-timeout>480</session-timeout>
   </session-config>
   ...
</web-app>

Hope this helps, more questions are welcome,
Christian



  Globally everything works fine, except that we encounter a kind of
automatic logout of the users maybe about 1 hour after their login,
maybe even less, it’s hard to say… In fact, our forms are quite big
and it often takes more than an hour to finish processing a single
historical resource, and when the user save his work, if he is logged
out, he loses all what he’ve done.
Would you know a way to increase this logout time? On our local BaseX instance, 
we tried changing the database options, including Keepalive 
(https://docs.basex.org/wiki/Options#KEEPALIVE). We changed the value 600 to 
60, just to make sure it was this option that needed to be changed, but it 
didn't seem to have any effect…

For the moment we set up an automatic backup system, but this solution 
introduces other issues and is therefore not ideal.

Thank you in advance for your help!!
Take good care,
Josselin.

Reply via email to