27.4.2 Updating Session Idle Timeout
You can configure the idle timeout value for a session.
The session idle timeout determines how long a session remains active
without submitting any tasks to the graph server (PGX). The
idleTimeout
value is set during session creation. If no value
is provided, then the server uses the session_idle_timeout_secs
value specified in the pgx.conf
configuration file. The default
value for the session_idle_timeout_secs
configuration is zero. This
implies that timeout is deactivated and the session can remain active indefinitely
as long as the server is running.
You can use the setSessionIdleTimeout
API to override
the session idleTimeout
value that was set at the time of session
creation. When you change the session idleTimeout
to any positive
non-zero value, then the timeout job gets reactivated.
All regular graph users having the
PGX_SESSION_SET_IDLE_TIMEOUT
permission can update the timeout
value of the current session using the
PgxSession#setSessionIdleTimeout
API as shown in the following
example.
Note:
ThePGX_SESSION_SET_IDLE_TIMEOUT
permission is granted by default
to the GRAPH_DEVELOPER
role. See Basic Steps for Using an Oracle Database for Authentication for more information.
opg4j> session.setSessionIdleTimeout(10L, TimeUnit.SECONDS)
session.setSessionIdleTimeout(10L, TimeUnit.SECONDS);
session.set_session_idle_timeout(10, "seconds")
If you are a graph server administrator having the
PGX_SERVER_MANAGE
permission, then you can update the timeout
value of other sessions using the PgxInstance#setSessionIdleTimeout
API as shown.
Note:
ThePGX_SERVER_MANAGE
permission is granted by default to the
GRAPH_ADMINISTRATOR
role. See Basic Steps for Using an Oracle Database for Authentication for more information.
opg4j> instance.setSessionIdleTimeout("<session_id>", 10L, TimeUnit.SECONDS)
instance.setSessionIdleTimeout(session_id, 10L, TimeUnit.SECONDS);
instance.set_session_idle_timeout('session_id', 10, 'seconds')
Parent topic: Graph Client Sessions