Document conversion issue there is not enough space on the disk in .NET

Hi everyone,

I see a topic posted in the GroupDocs.Total channel, but I may not have access to that channel. When I try to view it, I’m getting an access denied.

I’m seeing errors in my application log stating

GroupDocs.Conversion.Exceptions.GroupDocsConversionException: There is not enough space on the disk : ‘<OS_Drive>\AppData\Local\Temp\bf6f5c4a-e119-4aff-920c-b6b321445688.tmp’

Unfortunately I do not have access to the data file that is generating this exception, so I cannot reproduce the issue. But I’m curious what I can do about it. Is there something I can do within GroupDocs configuration to tell it to use a different location than \AppData\Local\Temp\ ?

Right now I’m doing all conversion in-memory using MemoryStreams instead of using FileStreams.

Would it be better to use File Streams?

Thanks for any suggestions you might have.
-Brian

1 Like

@bpieslak,

Please share following details and we will look into this matter:

  1. API Varient that you are using (.NET or Java)
  2. API version (e.g. 19.10, 20.3)
  3. Sample code you are using for the conversion process
  4. Development environment details (e.g. OS and it’s version)

Hi @atirtahir3.
I should have thought of that earlier. Sorry about that.

  1. & 2.) GroupDocs.Conversion (.NET) version 20.1.0
    to note, I also have Aspose.PDF (.NET) version 20.1.0 installed. I’m not sure if those possibly have a cross-dependency or cross-conflict.

3.) Sample Code - our code is fairly genericized, so the executing code block would be something like:

    private Stream DoConversion(Stream stream, SupportedDocumentConversionFormats format)
    {
        Stream outputStream = null;
        if (stream.CanSeek) { stream.Seek(0, SeekOrigin.Begin); }

        using (var converter = new Converter(() => stream, () => new ConverterSettings() { Listener = _groupDocsConverterListener }))
        {
            FileType source = converter.GetPossibleConversions().Source;
            if(source != null && !String.Empty.Equals(source.Extension))
            {
                if (source.Extension == format.Value) { return stream; }

                TargetConversion targetConversion = converter.GetPossibleConversions()[format.Value];
                if (targetConversion != null) {
                    outputStream = new MemoryStream();
                    converter.Convert(() => new MemoryStream(), converted => { converted.CopyTo(outputStream); }, targetConversion.ConvertOptions);
                }
            }
        }
        if (outputStream != null && outputStream.CanSeek) { outputStream.Seek(0, SeekOrigin.Begin); }
        return outputStream;
    }

where SupportedDocumentConversionFormats is a custom class of mine. I support multiple file types for uploaded data, but our document previewer only supports a handful of formats, so we use GroupDocs to convert the source data file format to the correct mapped format (like converting .docx to .pdf or converting .bmp files to .png)

4.) we are running on Windows Server 2012R2, running as an asp.dotnet core 2.2 application, running inside of IIS 7.5 (with the “LoadProfile” advanced setting in the IIS Application Pool enabled)

Let me know if that is sufficient or if you need more details.
I can try to look at our logs to figure out what the source file is that is triggering this error, and then to see if I can recreate it in my local environment.

Thanks for the support!
-Brian

1 Like

@bpieslak,

We’ll investigate this scenario. Your investigation ticket ID is CONVERSIONNET-3854.

That’ll be helpful if you find out the source file and try to recreate it in your local environment.

@bpieslak,

We need more details, please provide following information:

  • Do you face this issue with every file format?
  • What is the source file format and to what output format you are doing conversion?
  • Share the problematic file
  • Please prepare and share a sample console application using that issue could be reproduced

Hi @atirtahir3

Thank you for following up with me.
So far this problem has been erratic and not consistent in our application.
I definitely do not face this issue with every file format.
I am still working to get you a reproducible source file as well as source file format and output format.

-Brian

1 Like

@bpieslak

You are welcome.

Looking forward to it.