Internal error: Exception of type 'System.OutOfMemoryException' was thrown

is there a way to track

Issue ID(s): CONVERSIONCLOUD-588

I think no, but a notification will be posted in this topic, once the ticket is fixed. Also I will notify about the results of issue investigation status.

Hi, we tried to reproduce the issue, but the file was successfully converted to pdf using latest version of GroupDocs.Conversion Cloud self hosted.
Here is the resulting file:

Please try to pull the latest version of GroupDocs.Conversion Cloud and try again. Also, please ensure that your docker container has enough memory and CPU resourcers. We tested with 8GB RAM, but peak consumption was 2GB.

Here is the latest alpine version:
https://hub.docker.com/layers/groupdocs/conversion-cloud/24.8-alpine/images/sha256-328f52b9f6ddc49998cab5f3dda238eed432a0a1ee9711b474c446e6681bdcd3?context=repo

You can also try the image tagged with ‘latest’ tag, it also works well.

Please notify if you still have an issue.

Is it possible to use streams in this API?, if yes, could you please share any doc or example related this

Hi, yes, the API has ability to convert documents using streams:
here is the documentation page:

Hey!
In the example you shared its passing the complete file not the stream of file

Sorry, there is no other API methods that work with file streams

I’m asking that I’m Using /v2.0/conversion API can this be work with stream, If yes then can you please share a doc for that.
Earlier you said: yes, the API has ability to convert documents using streams
but the document you share doesnot have any example related to streams.
could you please properly explain this

Sure, for example, let’s take a c# example
As we can see, the API method, that performs conversion, take a stream as an argument. This can be not exactly file stream, but any other stream:

var request = new ConvertDocumentDirectRequest("pdf", fileStream, null, null, loadOptions);
var response = apiInstance.ConvertDocumentDirect(request);

But in this example, a file stream used to create a stream, and it’s initialized from a file:

var fileStream = File.Open("..\\..\\..\\Resources\\WordProcessing\\password-protected.docx", FileMode.Open);

This is done so for example only, but in you code, you may initialize the stream using other way, from a database, or network.

Hey!
Is there a why to optimize memory consumption as consumption was 2GB for only 50mb file this is so huge, we have a use case where we can convert much larger files 1gb-2gb. Then what will be the peak memory consumption? if its much higher then this will significantly increase the cost.

Please look into this and suggest a way to consume less memory

Also, the example you shared look like its for SDK not for API,
We are using node and make a axios call to the conversion API
also, above example is not using streams properly

@sergei.terentev any update on this

Hi, we didn’t test large files, like 1 or 2 Gb. If you are using self-hosted version, I’d suggest to look at other non-cloud products, like .NET, Java, or Node.js via Java versions.
Yes, the example is SDK example, but, of course, you are free to call the API using any other method. SDK is just offers one of the ways.
I’m not get what do you mean: “above example is not using streams properly”

Could you please suggest what is the max size you have tested a self hosted version of GroupDocs.Conversion Cloud, also the min memory requirement for this

Hi, we have tested about 100MB files, but not Excel format. The memory consumption depends of document format and it’s content. If you share a file that need to be tested, we can perform a conversion test for you.

Can we connect over a call to discuss this further! as we are paid customer and we need this functionality for our use case.

also is there a way to enable logs i just see

info: GroupDocs.Conversion.Cloud.Web.Startup[0]
The license has been set.
Hosting environment: Production
Content root path: /app
Now listening on: http://[::]:80
Application started. Press Ctrl+C to shut down.

Sorry, we (free forum support and product dev team) do not provide calls. Paid support is a separate service at https://helpdesk.groupdocs.com

I will create an investigation ticket about logs and will let you know about results

@sopan09
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CONVERSIONCLOUD-589

Hi, we have added a log option to the self-hosted version: please set this env var LOG_API_REQUESTS : “true” to enable logging of all requests.