We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Writing large files to network drives fail

Hi Aspose team,


We have a production issue on Windows Server machines which don’t have a hard drive and write files to network drives.

The exception is this:
java.io.IOException: Insufficient system resources exist to complete the requested service
at com.aspose.cells.Workbook.save(Unknown Source)

Note that the system memory is much more than necessary for the operation.
While investigating the issue we came across this article, which sheds light on the nature of the problem:

http://sam-pointer.com/2009/04/06/unc-shares-and-java-io-ioexception-insufficient-system-resources-exist-to-complete-the-request

If Aspose code allocates large memory chunks for large files during the save operation, that may fail on machines with larger kernel memory size. We could only reproduce the issue on Windows Server machines like that.

The solution would be to limit allocated chunks to about 20MB if the target file system is not local.
Please investigate.

thank you,
Laszlo Borsos
MSCI Barra

Hi Laszlo,

Thanks for providing us some details about the issue.

Well, we think you should try to save the Workbook to a ByteArrayOutputStream and then save that byte[] array to your remote file to check if it works fine. By the way, since you got large data to be written to remote file, so, there is possibility that these type of exceptions might occur.

Anyways you can try what we suggested above.

Thank you.

Thank you for your answer.

If we write to a byte array first, that means we always need to spare enough memory for that (200 MB or more), even when system load is high. The file writing is then a separate next step. I was hoping it can be done faster, using less resources within workbook.save().

Laszlo

Hi Laszlo,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells for Java. We have tested remote path like \\192.168.0.2\share\res.xls with a large excel file and it works fine.

Thank You & Best Regards,

The issues you have found earlier (filed as 10661) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.