Hi everyone,
I’m running into a payload size limitation in OutSystems and would like to get some advice or confirmation on the recommended approach.
Currently, I have a Timer that queries around 1,000,000 records, converts the result into an Excel file, and then uploads the file to Amazon S3. However, the process fails with an error indicating that the input payload exceeds the ~5.5MB limit.
From what I understand, this payload limit is enforced by the OutSystems platform and cannot be increased via configuration. Because of this, exporting such a large dataset into a single Excel file in one action does not seem feasible.
I also found this article relevant to the issue:https://without.systems/odc-with-aws-s3-backend-to-s3
The article explains that in OutSystems Developer Cloud, External Logic functions have a request/response payload limit of about 5.5MB. It suggests using pre-signed S3 URLs plus REST operations for larger files, instead of sending the full binary through the connector. However, I also noticed that the PutObject action available in the AWSSimpleStorage library does not expose the same parameters described in the article (such as Date, Algorithm, Credential, Signature, etc.), since those belong to a custom REST operation built on top of a pre-signed URL rather than the connector itself.
I’d appreciate any best practices or patterns you’ve used successfully for large data exports in OutSystems, especially when uploading to external storage like S3.
Thanks in advance!
Hi, as Saugat explained the process is differently. You can check the applied practices written in my tutorials in the demo application "ODC with AWS S3 Patterns" on Forge.
Stefan
It looks like you're encountering the payload size limitation in OutSystems Developer Cloud (ODC) when handling large file uploads to AWS S3. This is indeed a known limitation, as OutSystems enforces a payload size restriction of approximately 5.5MB for both request and response payloads. Here are some best practices and feasible patterns you can use to overcome this limitation:
Instead of querying all 1,000,000 records at once, you can divide the dataset into smaller batches and create multiple Excel files. Each file will stay under the payload size limit and can be uploaded sequentially to S3.
Benefits:
Challenges:
Pre-signed URLs are a more efficient way to handle large file uploads to S3. In this approach:
Implementation Steps:
This method bypasses OutSystems' payload size limitations entirely and is highly efficient.
Instead of generating the entire Excel file in memory, explore libraries/services that allow streaming rows to an Excel file, writing data incrementally to the file system or directly to S3. Memory consumption stays low, and payload size issues can be avoided.
Example Workflow:
Note: This would require either a custom connection to AWS S3 or integration of third-party libraries that support streaming.
For processes requiring high scalability, you may offload this operation to external logic hosted in AWS Lambda, a custom backend, or another service. Here’s how:
This keeps the OutSystems application lightweight and avoids sizing bottlenecks.
For your specific case, combining batch processing with pre-signed URLs is likely the best solution. Here's a step-by-step outline:
This approach avoids memory overloading, adheres to the platform's payload limits, and provides better scalability.
You may also refer to this useful community post on addressing payload limits and large file exports in ODC Large Files in ODC.
Let me know if you need further guidance!
Hi @Tuan Duong,
The officially recommended approach for large files in ODC and is exactly what the article you referenced describes here.
How it works conceptually
Hope this helps,
Cheers.
Saugat
Thank @Stefan Weber , I looked your demo project and apply it into my personal application and can upload file to S3 success using Rest APIs.
Great to read. Well done @Tuan Duong !