4.2.6 Advanced Access Configuration

You can customize the following fields inside the pgx_realm block in the pgx.conf file to customize login behavior.

Table 4-2 Advanced Access Configuration Options

Field Name Explanation Default
token_expiration_seconds After how many seconds the generated bearer token will expire. 3600 (1 hour)
connect_timeout_milliseconds After how many milliseconds an connection attempt to the specified JDBC URL will time out, resulting in the login attempt being rejected. 10000
max_pool_size Maximum number of JDBC connections allowed per user. If the number is reached, attempts to read from the database will fail for the current user. 64
max_num_users Maximum number of active, signed in users to allow. If this number is reached, the graph server will reject login attempts. 512
max_num_token_refresh Maximum amount of times a token can be automatically refreshed before requiring a login again. 24

To configure the refresh time on the client side before token expiration, use the following API to login:

int refreshTimeBeforeTokenExpiry = 900; // in seconds, default is 1800 (30 minutes)
ServerInstance instance = GraphServer.getInstance("https://localhost:7007", "<database user>", "<database password>",


The preceding options work only if the realm implementation is configured to be oracle.pg.identity.DatabaseRealm.