You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/refguide/runtime/custom-settings/_index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ The following custom settings can be configured:
52
52
| <aid="ClientCertificates"href="#ClientCertificates">ClientCertificates</a> | Comma-separated list of paths to Client Certificates. Example: `D:\App\Mx1.pfx, D:\App\Mx2.pfx, D:\App\Mx3.pfx, D:\App\Mx4.pfx`||
53
53
| <aid="ClientCertificateUsages"href="#ClientCertificateUsages">ClientCertificateUsages</a> | Only use this when you have multiple client certificates and you want to configure specific certificates for specific servers.<br/> This setting defines which service must use which client certificate. See **NoClientCertificateUsages** if you want to make sure that no client certificate is used for a certain host or web service. The value of **ClientCertificateUsages** must be a comma-separated list of key/value items. A key/value item must be specified as `"identifier": "path to certificate"`.<br/>For web services, use the imported web service name as the identifier.<br/>For REST services, use the host name of the remote server as the identifier.<br/>Please note that any backslash in the path must be doubled. The whole value must be enclosed by braces (`{ }`). For example: {{< figure src="/attachments/refguide/runtime/custom-settings/code_snippet.png" class="no-border" >}} ||
54
54
| <aid="NoClientCertificateUsages"href="#NoClientCertificateUsages">NoClientCertificateUsages</a> | Comma-separated list of host names or imported web service names that should never be contacted using a client certificate. ||
55
-
| <aid="ClusterManagerActionInterval"href="#ClusterManagerActionInterval">ClusterManagerActionInterval</a> | The interval (in milliseconds) used for performing all cluster manager actions, such as unblocking users and removing invalid sessions. Must not exceed twice the [`SessionTimeout`](#SessionTimeout), or expired sessions may remain in the database too long. If explicitly set to a value exceeding twice the `SessionTimeout`, startup fails with an error. | 300000 (5 minutes).<br /> In Mendix 11.11.0 and above, if `SessionTimeout` ≤ 10 minutes and this default exceeds twice the `SessionTimeout`, `SessionTimeout` / 2 is used as the default (and a warning is logged).|
55
+
| <aid="ClusterManagerActionInterval"href="#ClusterManagerActionInterval">ClusterManagerActionInterval</a> | The interval (in milliseconds) used for performing all cluster manager actions, such as unblocking users and removing invalid sessions. See [Advanced Custom Settings](/refguide/tricky-custom-runtime-settings/) for important details about valid values and their relationship to other session settings. | 300000 (5 minutes) |
56
56
| <aid="commendixcoreisClusterSlave"href="#commendixcoreisClusterSlave">com.<wbr>mendix.<wbr>core.<wbr>isClusterSlave</a> | Set to `true` in a high-availability scenario when this is *not* the [Cluster Leader](/refguide/clustered-mendix-runtime/#cluster-leader-follower). The buildpack will usually enforce this setting, but it may need to be set for some on-premises deployments. |`false`|
57
57
| <aid="commendixcoreLenientDateTimeParsing"href="#commendixcoreLenientDateTimeParsing">com.<wbr>mendix.<wbr>core.<wbr>LenientDateTimeParsing</a> | When set to `true`, the `parseDateTime` function will use more lenient parsing, as it did in Mendix 9. For example `parseDateTime("yyyyMMdd", "2021-11-10")` will return `2020-11-01` as a date if this is set to true, which is probably not the intended result.. If set to `false`, which is the default, this example will throw an error as it is expecting `20211110`. It is recommended to not enable this setting to avoid unexpected results. |`false`|
58
58
| <aid="commendixcoreSameSiteCookies"href="#commendixcoreSameSiteCookies">com.<wbr>mendix.<wbr>core.<wbr>SameSiteCookies</a> | The [SameSite](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite) property can be included in all cookies that are returned by the embedded HTTP server. The possible values are `Strict`, `Lax`, and `None`. The default is `Strict`. Setting it to `None` is typically needed only when an application is embedded in an iframe of another application with a different domain. Newer browsers may require the connection to be secure (HTTPS) when set to `None`. If the connection is plain HTTP, then this setting must be changed to `Strict` (recommended) or `Lax`. ||
@@ -73,7 +73,7 @@ The following custom settings can be configured:
73
73
| <aid="JavaKeyStorePassword"href="#JavaKeyStorePassword">JavaKeyStorePassword</a> | Password for the default Java keystore. | changeit |
74
74
| <aid="MyScheduledEvents"href="#MyScheduledEvents">MyScheduledEvents</a> | A comma-separated string with the names of the events. Please don't forget the name of the module (a name can be, for example, `CRM.UpdateCustomerStatistics`). {{% alert color="warning" %}}When running in multiple nodes, each node should have the same value for all runtime settings. Setting different values for different nodes to force specific scheduled events to be executed by specific nodes is not supported. It will not work and can lead to unexpected runtime errors.{{% /alert %}} ||
75
75
| <aid="ScheduledEventExecution"href="#ScheduledEventExecution">ScheduledEventExecution</a> | Specify which scheduled events should be executed. Choices are `ALL`, `NONE`, or `SPECIFIED`. In the case of `SPECIFIED`, enumerate the scheduled events using the `MyScheduledEvents` configuration option described below. {{% alert color="warning" %}}This setting cannot be configured when running locally. To enable and disable scheduled events when running locally, please use the 'Enabled' setting on the [Scheduled Events execution properties](/refguide/scheduled-events/) in Studio Pro.{{% /alert %}} {{% alert color="warning" %}}When running in multiple nodes, each node should have the same value for all runtime settings. Setting different values for different nodes to force specific scheduled events to be executed by specific nodes is not supported. It will not work and can lead to unexpected runtime errors.{{% /alert %}} | NONE |
76
-
| <aid="SessionKeepAliveUpdatesInterval"href="#SessionKeepAliveUpdatesInterval">SessionKeepAliveUpdatesInterval</a> | Defines how often a runtime writes session LastActive dates in its memory back to the database. The value must not be greater than half the [`ClusterManagerActionInterval`](#ClusterManagerActionInterval) and must not be greater than the [`SessionTimeout`](#SessionTimeout), or else active sessions may be cleaned up. | 100000 (100 seconds).<br />In Mendix 11.11.0 and above, if `SessionTimeout` or half the `ClusterManagerActionInterval` is less than or equal to 100 seconds, `ClusterManagerActionInterval` / 3 is used as the default (and a warning is logged).|
76
+
| <aid="SessionKeepAliveUpdatesInterval"href="#SessionKeepAliveUpdatesInterval">SessionKeepAliveUpdatesInterval</a> | Defines how often a runtime writes session LastActive dates in its memory back to the database. See [Advanced Custom Settings](/refguide/tricky-custom-runtime-settings/) for important details about valid values and their relationship to other session settings. | 100000 (100 seconds)|
77
77
| <aid="SessionTimeout"href="#SessionTimeout">SessionTimeout</a> | Defines after how much time a session becomes invalid (in milliseconds). After that timeout, a session becomes eligible for removal. The session will not be destroyed until the next time a scheduled task runs to clean up the active sessions. <br> {{% alert color="warning" %}} Sessions can be removed immediately by a query to the runtime after the session becomes eligible for removal. Navigating between pages is not enough to trigger a query to the runtime. To force a query to the runtime, use a microflow. For example, create a microflow that shows the Home page, then configure your app's navigation to call this microflow rather than relying on the navigation to directly show the page itself. This will ensure the runtime is queried and the user session is removed. {{% /alert %}} | 600000 (10 minutes) |
78
78
| <aid="AbsoluteSessionTimeout"href="#AbsoluteSessionTimeout">AbsoluteSessionTimeout</a> | Defines after how much time a session becomes invalid (in milliseconds). After that timeout, a session becomes eligible for removal. As opposed to the `SessionTimeout`, the `AbsoluteSessionTimeout` timeout is not affected by user interactions. This does not override [`SessionTimeout`](#SessionTimeout), sessions also become invalid if `SessionTimeout` is reached. The session will be destroyed in the same way as for [`SessionTimeout`](#SessionTimeout), above. If the setting is not set then this behavior is disabled, which is the default. | Disabled. *Introduced in Mendix 11.4.0.*|
79
79
| <aid="SessionValidationTimeout"href="#SessionValidationTimeout">SessionValidationTimeout</a> | Defines the maximum caching time (in milliseconds) for sessions. This means that after signing out of a session, the session might still be accessible for the configured time on other nodes of the cluster, but only if that node has handled a previous request on that session just before the logout happened. Lowering it makes the cluster more secure, because the chance that the session is still accessible within the configured time window is smaller. However, this also requires more frequent roundtrips to the database (which impacts performance). Increasing the timeout has the opposite effect | 30000 (30 seconds) |
Copy file name to clipboardExpand all lines: content/en/docs/refguide/runtime/custom-settings/tricky-custom-runtime-settings.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,8 @@ The following custom settings can be configured:
29
29
| --- | --- | --- |
30
30
|`SessionTimeout`| Defines after how much time the session becomes invalid (in milliseconds). After that timeout, a session becomes applicable for removal. The session won't be destroyed until the next time the cluster manager evaluates the active sessions. | 600000 (10 minutes) |
31
31
|`com.mendix.offline.DeleteAutoCommittedObjectsAfterSync`| Defines if auto-committed created during offline synchronization will be deleted from the database immediately. | true |
32
-
|`ClusterManagerActionInterval`| The interval (in milliseconds) used for performing all cluster manager actions. These actions include unblocking users and removing invalid sessions. If nothing is specified, the interval is half the `SessionTimeout`. | 300000 (5 minutes)|
33
-
|`SessionKeepAliveUpdatesInterval`| Defines after how much time expired sessions can be removed from the database. | one sixth of the value configured for the `SessionTimeout` setting; if the `SessionTimeout` is not set, this value defaults to 100000 (100 seconds)|
32
+
|`ClusterManagerActionInterval`| The interval (in milliseconds) used for performing all cluster manager actions. These actions include unblocking users and removing invalid sessions. See the constraints section below for default value details. ||
33
+
|`SessionKeepAliveUpdatesInterval`| Defines how often a runtime writes session LastActive dates in its memory back to the database. See the constraints section below for default value details. ||
34
34
35
35
Increasing the session timeout can improve the user experience, especially on mobile devices. It is important to keep in mind that entities used to present data to the user or entities that are created or retrieved when a user executes a microflow are tied to that user's session, and those entities can remain in memory for long periods of time. When a user signs out, these entities will be removed from memory, but if the user idles but does not sign out (for example, if they leave the browser tab open while executing other tasks or simply close the browser without signing out), the session timeout can act as a safeguard that prevents memory usage from being tied up by idle sessions. The first case can also be mitigated by setting the `EnableKeepAlive` custom setting to false. On most browsers, this setting will ensure that any idle browser tab will be affected by the session timeout as well.
36
36
@@ -39,6 +39,26 @@ Since the frequency of the session timeout checks and other important events is
39
39
Another consideration is that configuring `ClusterManagerActionInterval` to be much longer than the `SessionTimeout` will lead to expired sessions remaining in the database longer.
40
40
Configuring `SessionKeepAliveUpdatesInterval` to be longer than the `ClusterManagerActionInterval` or configuring `SessionKeepAliveUpdatesInterval` to be longer than the `SessionTimeout` will cause active sessions to be cleaned up. The Runtime will fail to start if these three settings are not configured correctly.
41
41
42
+
### Session Timing Constraints and Defaults
43
+
44
+
The following constraints apply to `ClusterManagerActionInterval` and `SessionKeepAliveUpdatesInterval`:
45
+
46
+
**ClusterManagerActionInterval:**
47
+
48
+
* Must not exceed twice the `SessionTimeout`, or expired sessions may remain in the database too long
49
+
* If explicitly set to a value exceeding twice the `SessionTimeout`, startup fails with an error
50
+
* Default value:
51
+
* Before Mendix 11.11.0: 300000 (5 minutes), or half the `SessionTimeout` if not explicitly specified
52
+
* In Mendix 11.11.0 and above: 300000 (5 minutes), unless `SessionTimeout` ≤ 10 minutes and this default exceeds twice the `SessionTimeout`, in which case `SessionTimeout` / 2 is used (and a warning is logged)
53
+
54
+
**SessionKeepAliveUpdatesInterval:**
55
+
56
+
* Must not be greater than half the `ClusterManagerActionInterval`, or else active sessions may be cleaned up
57
+
* Must not be greater than the `SessionTimeout`, or else active sessions may be cleaned up
58
+
* Default value:
59
+
* Before Mendix 11.11.0: one sixth of the `SessionTimeout`, or 100000 (100 seconds) if `SessionTimeout` is not set
60
+
* In Mendix 11.11.0 and above: 100000 (100 seconds), unless `SessionTimeout` or half the `ClusterManagerActionInterval` is ≤ 100 seconds, in which case `ClusterManagerActionInterval` / 3 is used (and a warning is logged)
61
+
42
62
With stateless runtime, the potential of memory usage leading to problems has been reduced for two reasons. The first reason is the ability to run in a horizontally scaled environment. Multiple runtimes will mean unintended memory usage is also divided over those runtimes, reducing the impact of any one idle user session. But the main (and second) reason is that most of the memory usage has been moved to the client. So instead of all entities in the memory ending up on the application node, a large share of them will end up in the browser of the client. This should significantly reduce the potential strain on the application node that can be caused by increasing the `SessionTimeout` default value to a much higher value.
43
63
44
64
Another important matter that can be affected by increasing the session timeout is the user restrictions imposed by your Mendix license. Longer sessions might mean more concurrent users at any given time. This is something to keep in mind when deciding on the specifics of the license you will need to run your application.
0 commit comments