MuleSoft · File Connector
java.lang.OutOfMemoryError when listing files
Short answer
A java.lang.OutOfMemoryError from the File Connector List operation with large files is caused by the default streaming strategy, Repeatable file store iterable. Change the operation's Streaming strategy to No repeatable iterable.
VerifiedLast verified
01Error text
java.lang.OutOfMemoryError02Likely causes
- The List operation handles large files while its Streaming strategy is "Repeatable file store iterable (Default)".
03How to fix it
- Open the List operation's streaming settings.
- Change the Streaming strategy field to "No repeatable iterable".
- Make sure the flow reads the listed content only once, since the result can no longer be read again.
- Redeploy and run the flow with the same files.
04Official documentation
→Related errors
- MULE:FATAL_JVM_ERRORMULE:FATAL_JVM_ERROR means a fatal error occurred in the JVM, such as a stack overflow. It cannot be handled in a flow, and the only safe recovery after a VirtualMachineError is to restart the Mule runtime instance.
- MULE:STREAM_MAXIMUM_SIZE_EXCEEDEDMULE:STREAM_MAXIMUM_SIZE_EXCEEDED means a stream grew past the maximum size allowed for it, typically the in-memory buffer of a repeatable in-memory stream. Raise the buffer's maximum size, or use a streaming strategy that does not keep the content in memory.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer