Not enough storage is available to complete this operation: E_OUTOFMEMORY

Symptoms

Error "Not enough storage is available to complete this operation: E_OUTOFMEMORY" may appear during the processing.

Cause

This issue often appears when system's resources are not enough to process the document.

Resolution

Please see below the recommendations that should help you to prevent “not enough memory/storage...” issue:

• Processing multipage documents

100-page document is considered as a quite large document. 100 ImageDocument and Layout objects may use up to 2 GB or more of virtual memory, not mentioning the memory required for image processing.

We recommend you to use the following settings:

IFRDocument::PageFlushingPolicy = PFP_FlushTo Disk 
IPrepareImageMode::ImageCompression = IC_Compress
IPrepareImageMode::KeepOriginalCoordinatesInfo = false (starting from FRE11 R5)

Please read more about these settings in help file.

Please note that temporary objects are stored to %TEMP% folder. It is possible to change folder for temporary files by modifying frDocument.TempDir property (this folder should be created in advance) before calling frDocument.AddImageFile() method. The other side of PageFlushingPolicy = PFP_FlushToDisk is that you should have sufficient free space on the drive where temporary files are stored. For 100-page document, we would recommend you to have at least 5-10 GB free.

• Accessing sub-objects

We do not recommend you to make long chains of sub-objects: object0.subobject1.subobject2. … .subobjectN as it may lead to memory leak.
The better approach is to split such chains:

SubObject1Type object1 = object0.subobject1
SubObject2Type object2 = object1.subobject2 ...

In the end, when you don’t need these objects, they should be set to nil value.

• Deinitializing Engine periodically

Sometimes deinitializing Engine from time to time may help to prevent memory issues. For example, you may call deinitialize Engine and initialize it again every 1000 images.

Our developers recommend to call GC.Collect, GC.WaitForPendingFinalizers before the DeinitializeEngine method and after processing each FRDocument, and Marchal.ReleaseComObject for all objects.

Have more questions? Submit a request

Comments

3 comments

  • Avatar

    Ken Falk CCIM

    100 page document - out of memory error.  Your recommendation may be clear to a computer professional, but not to me.  I have 251GB of free solid state disk memory and 64GB RAM, but get the out of memory error when recognizing a document.  What simple settings, in plain simple language, should I go to, to reset the memory available available for processing a 100 page document in FineReader 15 Corporate?

    0
  • Avatar

    Victoria Dvornikova

    Hi Ken,

    Please note, that this article describes a solution for FineReader Engine product. I have created a support ticket based on your comment, please await a reply from Support Team.

    0
  • Avatar

    Nikolaos Giannakopoulos

    Hi Victoria,

    I have an error «Error communicating with ABBYY Product Licensing Service on IP: Not enough storage is available to complete this operation.» keeps occurring at the testing installation of FRE12 . I am using the default port of Licensing Server for FRE12. The app service uses service plan P2V2 (7GB memory, 250GB storage), Licensing Server has ~10GB free memory and ~15GB free storage.

    I have also noticed that several connections with the Licensing Server remain open after the error has occurred. Is this normal?

    Please advise me, how the specific error will be overcome.

    Thanks in advance.

    0

Please sign in to leave a comment.