When a Mule 4 on-premise application is restarted while a batch job is still running, the job instance may remain in the EXECUTING state.
Graceful restart (stop/start or redeploy): In most cases, Mule attempts to resume pending jobs. However, there are scenarios where the batch job does not resume correctly and remains stuck.
Abrupt restart / JVM kill: If the JVM is killed or the restart happens abruptly during batch execution, the Object Store used for the batch instance may become corrupted. This prevents the job from resuming and leaves stale entries behind.
maxAge behavior: The maxAge setting only clears job instances that are in a Expired state. Jobs left in EXECUTING are not eligible for cleanup and will attempt to resume.
As a result, subsequent scheduled jobs can also get stuck in the Loading phase, since the previous instance is still considered active and blocking execution.
To resolve this issue:
1. Undeploy the application.
2. Confirm the corresponding folder is deleted under $MULE_HOME/.mule/<app-name>.
3. Redeploy the application fresh.
This clears any stale batch or object store state that may have been left during the restart.
By default, Batch uses ORDERED_SEQUENTIAL, based on its timestamp, and processes records one by one. Refer Documentation https://docs.mulesoft.com/mule-runtime/latest/batch-reference
Mule 4 Batch Processing Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference)
Salesforce KB: When to Modify the .mule Folder](https://help.salesforce.com/s/articleView?id=001118518&type=1)
005224545

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.