I’m using groupdocs conversion cloud deployed on my server but when I try to convert 50mb xls file its giving error
Internal error: Exception of type ‘System.OutOfMemoryException’ was thrown
I’m using the following API /v2.0/conversion?format=pdf&fromPage=1&pagesCount=0
Hi, please confirm that you’re using self-hosted version of GroupDocs.Conversion Cloud, also please share image tag, and attach the input file, if possible, that cause the error, so we can reproduce the issue, Thanks!
@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.
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.
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
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”