Aspose mail merge memory issue


We have been using aspose mailmerge for a long time and recently we have updated to version 22.8 from 19.9 and since then we are noticing memory issues.

22.8 version - Memory and duration increase as time progresses.
19.9 version - Memory used is good

Attached below the lambda code and the logs for memory usage. Our templates are simple and not very complicated. Attached a sample template as well for your reference. (5.9 KB)

CivilCourtNonComplFilingNotification.docx (15.5 KB)

19.9.JPG (123.4 KB)
V22.8.jpg (215.4 KB)


@judiciary sorry, I wasn’t able to replicate your issue. I reproduced the merge field operation with dummy data in a simple CLI application. In my test, the memory consumption was 38MB when using .NET and 79MB when using Java. I used the latest version of Aspose.Words API available for each language (v23.6 for .NET and 23.5 for Java).
output.docx (13.1 KB)


We were using 23.3 version and when we tried updating to 23.5 our lambda size became too big and we are unable to upload it to AWS. We have exceeded the max allowed lambda limit. Is there a way to compress aspose jars to support with AWS lambda or is there any other workaorund?

Can you also please test this in 23.3 and let us know if you are able to replicate the memory issue


Hello, were you able to look into this? We had to back out our prod changes as the jobs were failing because of high memory consumption. Any update is appreciated.

How compatible is aspose with AWS environment. Is tehre anything different you would suggest to make aspose efficient when running on AWS



Unfortunately, we can’t reproduce this issue on our side. Please try updating your Aspose library to the latest version. It can be downloaded from the following links:
Aspose.Words for Java 23.6

Additionally, I note that version 23.6 .jar is smaller than 23.5, so this should fix the issue with using lambda with AWS.


We have updated to use aspose java jar version 23.6 for both word and pdf and still see that the jars are significantly bigger than the prior versions from 2022. AWS lambdas have a limitation of how big the lambda jar file can be and when we updated with the new aspose 22.6 jars we are exceeding this limit. Is there a way to reduce the size of aspose jars. Aspose java jars for pdf and word combined are around 90 MB in size. Please let us know what the options are and how we can get past this.


@judiciary I will consult with responsible developer about options to reduce the Aspose.Words jar size and let you know. Regarding the size of Aspose.PDF jar you should ask on the Aspose.PDF Product Family Forum. Also in case you have limitations regarding the assembly sizes, you may check Aspose Cloud APIs which may suit you.

We have opened the following new ticket for Aspose.Words jar size reduction in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSJAVA-2880

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

We have paid support for our account, how can we convert or move this ticket there?

@judiciary You should escalate the issue in the Paid Support Helpdesk. Then my colleagues from Paid Support team will raise the issue priority. But please note that Aspose.Words jar size is rather small comparing to Aspose.PDF jar. So reducing the Aspose.Words jar size may not help you to solve the issue with AWS lambda if Aspose.PDF jar size will remain the same.