I am using GNU Health 5.0 with Tryton 7. I have configured the session to expire after 3 minutes of inactivity. However, the session expiration is not working consistently.
In some cases, I receive a Gateway Error, while in other cases, when I am actively working in the system, it unexpectedly asks me to enter my password again.
Could you please help me identify the cause of this issue and advise how to properly configure the Tryton session timeout so that it works consistently without causing Gateway Errors or unexpected password prompts?
If you are talking about the configuration [session] timeout is about the freshness of the session. This is checked only for specific actions. So this can be the reason for your un-expectation.
Now if you have setup [session] max_age then you must adapt [session] timeout to be lower in order to have effect.
Also remember that the freshness of a session is based on the requests performed to the server. If the client is “used” but does not trigger any server request, these actions are not refreshing the session.
Session refresh time is 10 minutes, so it ask password after 10 minutes .
I want to configure the system so that if a user remains idle for 10 minutes, the session should expire or require the user to enter their password again.
The password prompt should occur only after 10 minutes of inactivity and should not interrupt users while they are actively working in the system.
To achieve that you must modify all the RPC definitions to set fresh_session to True and set [session] timeout to 10min.
By default Tryton set it only for important operation like posting an invoice or approve a payment.