Skip to content

Commit 9e7f6a3

Browse files
authored
Merge pull request mendix#7346 from atennapel/run/3889-cleanup-batch-size-9
[RUN-3889] Changes for BatchSize config for clean up actions (9.24.17)
2 parents 4528d1f + dd321ca commit 9e7f6a3

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

content/en/docs/refguide9/modeling/resources/task-queue.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ The period for a graceful shutdown of queues can be configured as a [custom runt
168168
| Configuration option | Example value | Explanation |
169169
|--------------------------------------------|---------------|-----------------------------------------------------------------------------------------|
170170
| `TaskQueue.ShutdownGracePeriod` | 10000| Time in ms to wait for task to finish when shutting down. |
171-
| `com.mendix.core.ProcessedTasksCleanupAge` | 86400000| Time in ms after which `ProcessedQueueTask` are deleted automatically (no tasks are automatically deleted if this setting is not specified). <b/>*This setting was introduced in Mendix 9.9.0* |
171+
| `com.mendix.core.ProcessedTasksCleanupAge` | 86400000| Time in ms after which `ProcessedQueueTask` are deleted automatically (no tasks are automatically deleted if this setting is not specified). <br />*This setting was introduced in Mendix 9.9.0* |
172+
| `com.mendix.core.ProcessedTasksCleanupBatchSize` | 10000| Specifies how many System.<wbr>ProcessedQueueTask objects will be removed from the database each time the ProcessedTask cleanup action runs. <br />*This setting was introduced in Mendix 9.24.17* |
172173

173174
{{% alert color="info" %}}
174175
This grace period is applied twice during the [shutdown](#shutdown) (described below) so the maximum time that the runtime will wait for tasks to end is twice this value.
@@ -185,8 +186,7 @@ Tasks that have been processed, that is have completed or failed, are saved as o
185186
1. Verify that tasks have run successfully, or
186187
2. Debug the application in case of errors.
187188

188-
`System.ProcessedQueueTasks` objects are by default never deleted. The user is free to delete them when desired.
189-
If you are using Mendix 9.9.0 or above, you can use the `com.mendix.core.ProcessedTasksCleanupAge` runtime setting if automatic cleanup is desired.
189+
See [Cleaning Up Old Processed Tasks](#cleanup) for details about the cleanup of `System.ProcessedQueueTask` objects in the database.
190190

191191
### 2.9 Execution Context {#context}
192192

@@ -240,14 +240,14 @@ Interrupting task threads may cause them to fail. These tasks will be marked as
240240

241241
### 2.13 Cleaning up old processed tasks {#cleanup}
242242

243-
The execution of a task produces a `System.ProcessedQueueTask` row in the database. Over time these accumulate and the table can grow large.
243+
The execution of a task produces a `System.ProcessedQueueTask` object in the database. Over time these accumulate and the table can grow large.
244244

245-
In Mendix 9.9 and above, the `System.ProcessedQueueTask` can be cleaned up automatically by specifying the `com.mendix.core.ProcessedTasksCleanupAge` runtime setting. This setting specifies (in milliseconds) how old rows in the table have to be before they are automatically cleaned up. Only rows with the "Completed" status are cleaned up. The cleanup action will be run every [`ClusterManagerActionInterval`](/refguide9/custom-settings/#general), and does not produce any log messages.
245+
In Mendix 9.9 and above, the `System.ProcessedQueueTask` can be cleaned up automatically by specifying the `com.mendix.core.ProcessedTasksCleanupAge` runtime setting. This setting specifies (in milliseconds) how old objects in the table have to be before they are automatically cleaned up. Only objects with the "Completed" status are cleaned up. The cleanup action will be run every [`ClusterManagerActionInterval`](/refguide9/custom-settings/#general), and does not produce any log messages. In Mendix version 9.24.17 and above, the cleanup action will remove a maximum of 10000 objects each time it runs. This can be configured with the [`com.mendix.core.ProcessedTasksCleanupBatchSize`](/refguide9/custom-settings/#commendixcoreProcessedTasksCleanupBatchSize) runtime setting. In versions below Mendix 9.24.17, the action will remove all matching objects.
246246

247247
If `com.mendix.core.ProcessedTasksCleanupAge` is not specified, no cleanup is performed.
248248

249249
{{% alert color="info" %}}
250-
When turning on the automatic cleanup after having used tasks for a long time, there might be many rows to clean up, which will be initiated when the runtime starts. This may cause additional load on the database, but will not block the startup. It is recommended not to do this during a busy period.
250+
When turning on the automatic cleanup after having used tasks for a long time, there might be many objects to clean up, which will be initiated when the runtime starts. This may cause additional load on the database, but will not block the startup. It is recommended not to do this during a busy period.
251251
{{% /alert %}}
252252

253253
In versions of Mendix below 9.9.0, you can clean up old tasks by creating a microflow for administrators to use if the table gets too large.

content/en/docs/refguide9/runtime/custom-settings/_index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ The following custom settings can be configured:
5151
| <a id="ClusterManagerActionInterval" href="#ClusterManagerActionInterval">ClusterManagerActionInterval</a> | 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) |
5252
| <a id="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](/refguide9/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` |
5353
| <a id="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`. | |
54-
| <a id="commendixcoreScheduledEventsCleanupAge" href="#commendixcoreScheduledEventsCleanupAge">com.<wbr>mendix.<wbr>core.<wbr>ScheduledEventsCleanupAge</a> | This setting specifies (in milliseconds) how old rows in the System.<wbr>ScheduledEventInformation table have to be before they are removed from the database. See [Scheduled Events](/refguide9/scheduled-events-legacy/#cleanup) for more details. | |
54+
| <a id="commendixcoreScheduledEventsCleanupAge" href="#commendixcoreScheduledEventsCleanupAge">com.<wbr>mendix.<wbr>core.<wbr>ScheduledEventsCleanupAge</a> | This setting specifies (in milliseconds) how old objects in the System.<wbr>ScheduledEventInformation table have to be before they are removed from the database. See [Scheduled Events](/refguide9/scheduled-events-legacy/#cleanup) for more details. <br />*This setting was introduced in Mendix 9.9.0* | |
55+
| <a id="commendixcoreScheduledEventsCleanupBatchSize" href="#commendixcoreScheduledEventsCleanupBatchSize">com.<wbr>mendix.<wbr>core.<wbr>ScheduledEventsCleanupBatchSize</a> | This setting specifies how many System.<wbr>ScheduledEventInformation objects will be removed from the database each time the ScheduledEventInformation cleanup task runs. See [Scheduled Events - Legacy](/refguide9/scheduled-events-legacy/#cleanup) for more details. <br />*This setting was introduced in Mendix 9.24.17* | 10000 |
5556
| <a id="commendixcoreSessionIdCookieName" href="#commendixcoreSessionIdCookieName">com.<wbr>mendix.<wbr>core.<wbr>SessionIdCookieName</a> | Defines the name of the cookie value which represents the session ID. Can be useful to change when running in a container which assumes a certain name for the session cookie. | XASSESSIONID |
5657
| <a id="commendixcoreStorageService" href="#commendixcoreStorageService">com.<wbr>mendix.<wbr>core.<wbr>StorageService</a> | Defines which storage service module will be used. The storage service module takes care of storing the actual files associated with `System.FileDocument` objects, such as uploaded files. Possible values are `com.mendix.storage. localfilesystem`, `com.mendix.storage.s3`, and `com.mendix.storage.azure`. | com.<wbr>mendix.<wbr>storage.<wbr>localfilesystem |
5758
| <a id="commendixcoreUseMimeDecoderForBase64" href="#commendixcoreUseMimeDecoderForBase64">com.<wbr>mendix.<wbr>core.<wbr>UseMimeDecoderForBase64</a> | Introduced in Studio Pro 9.6.10 and 9.12.0. The setting defines whether to use the Basic decoder ([RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648)) or MIME decoder ([RFC 2045](https://datatracker.ietf.org/doc/html/rfc2045)) when decoding base64 binary data. The Basic decoder is recommended due to its strictness in not accepting any character outside the Base64 specification, see [Security Considerations](https://datatracker.ietf.org/doc/html/rfc4648#section-12). This setting exists for reasons of backward compatibility. Using the MIME decoder is deprecated and the option will be removed in future versions. | false |
5859
| <a id="commendixstoragePerformDeleteFromStorage" href="#commendixstoragePerformDeleteFromStorage">com.<wbr>mendix.<wbr>storage.<wbr>PerformDeleteFromStorage</a> | Defines whether a delete of a Mendix file document should result in an actual delete in the storage service. A reason to not perform an actual delete in the storage service can be when it is also used as a backup service. | true |
59-
| <a id="commendixcoreProcessedTasksCleanupAge" href="#commendixcoreProcessedTasksCleanupAge">com.<wbr>mendix.<wbr>core.<wbr>ProcessedTasksCleanupAge</a> | This setting specifies (in milliseconds) how old rows in the System.<wbr>ProcessedQueueTask have to be before they are removed from the database. See [Task Queue](/refguide9/task-queue/#cleanup) for more details. | |
60+
| <a id="commendixcoreProcessedTasksCleanupAge" href="#commendixcoreProcessedTasksCleanupAge">com.<wbr>mendix.<wbr>core.<wbr>ProcessedTasksCleanupAge</a> | This setting specifies (in milliseconds) how old objects in the System.<wbr>ProcessedQueueTask have to be before they are removed from the database. See [Task Queue](/refguide9/task-queue/#cleanup) for more details. | |
61+
| <a id="commendixcoreProcessedTasksCleanupBatchSize" href="#commendixcoreProcessedTasksCleanupBatchSize">com.<wbr>mendix.<wbr>core.<wbr>ProcessedTasksCleanupBatchSize</a> | This setting specifies how many System.<wbr>ProcessedQueueTask objects will be removed from the database each time the ProcessedTask cleanup action runs. See [Task Queue](/refguide9/task-queue/#cleanup) for more details. <br />*This setting was introduced in Mendix 9.24.17* | 10000 |
6062
| <a id="EnableApacheCommonsLogging" href="#EnableApacheCommonsLogging">EnableApacheCommonsLogging</a> | Some libraries used by the Mendix runtime use [Apache Commons](http://commons.apache.org/) for logging. By default these log messages are suppressed. Set this value to `true` to receive the log messages from these libraries in the Mendix logs. This setting is available in Mendix 9.1.0 and later. | false |
6163
| <a id="EnableFileDocumentCaching" href="#EnableFileDocumentCaching">EnableFileDocumentCaching</a> | Defines whether file documents should be cached. Only enable this if you are sure that the file documents will not contain sensitive information. Images are always cached. This setting is available in Studio Pro 9.6.1 and above. | false |
6264
| <a id="HashAlgorithm" href="#HashAlgorithm">HashAlgorithm</a> | Specifies the hash algorithm used to generate hash values for attributes of the HashString type, such as the password of a user. This setting overrides the setting in Studio Pro, see [Hash Algorithm](/refguide9/app-settings/#hash-algorithm). Possible values are `BCRYPT`, `SSHA256`, `SHA256` (not recommended) and `MD5` (not recommended). To override the default BCrypt cost, you can specify `BCRYPT:cost`, where 'cost' is a number between 10 and 30. An example value is `BCRYPT:12`. | BCRYPT |

0 commit comments

Comments
 (0)