OptimizePdf is not working after self hosting aspose pdf

I have created a pod for aspose pdf which is working fine. Issue is with optimize pdf function only.
Getting following error-
Error: Request failed with status code 500
{
RequestId: ‘792bd29f-5689-46d7-b356-92b4e97cf725’,
Error: {
Code: ‘internalError’,
Message: “Exception of type ‘System.OutOfMemoryException’ was thrown.”,
Description: ‘Operation Failed. Internal error.’,
DateTime: ‘2024-05-03T11:30:04.7162659Z’,
InnerError: null
}
}
I am trying to optimize a file which is present in data/merge folder
and I am calling this url
http://aspose-pdf-cloud.doc-qa.svc.cluster.local/v3.0/pdf/8LguaW9TaiyxDTsXA355saMB.pdf/optimize?storageName=First%20Storage&folder=data/merge
Although same is working in aspose cloud api.
Also please share if there is any documentation for aspose pdf self hosting

@Deepali11
We are investigating the problem.

@Deepali11
The problem (System.OutOfMemoryException) may be caused by limitations of your execution environment (Kubernetes+Docker).
Could you, please, share your input document with us?
We will try to reproduce and investigate the issue.

Hi team. It looks like the file path was not correctly specified in the URL. What I did was, I mounted my file at root location, i.e, inside data folder. So now I hit the request with below URL:

http://aspose-pdf-cloud.doc-qa.svc.cluster.local/v3.0/pdf/8LguaW9TaiyxDTsXA355saMB.pdf/optimize?storageName=First%20Storage

But I was getting an internal server error. This time, when I printed the error, it was something like the below:

{
RequestId: ‘0cfa0e6f-09ed-4d3e-af1b-891d321d3dcf’,
Error: {
Code: ‘internalError’,
Message: ‘Startxref not found’,
Description: ‘Operation Failed. Internal error.’,
DateTime: ‘2024-05-09T10:53:43.3953258Z’,
InnerError: null
}
}

@rajatdpw
You need not ‘storageName’ for SelfHost Aspose.PDF Cloud.
SelfHost Aspose.PDF Cloud works only with local storage.

I removed storageName, still same error in response.

Also, we have mounted the local storage to Azure file share. The same is working for all other on-premise conversions like docx to excel, merging pdfs, etc. I have cross verified that the file is present in mounted location

Hi team. Waiting for your response on this.

@rajatdpw
You got ‘startxref not found’ error.
This means that your .PDF file is malformed.
Please share your input document with us for investigation.

hi team. issue is resolved. The file I was trying with seems to be corrupted. For rest of the files it’s working fine. Thanks