Jump to content

Error Allocating Memory


Recommended Posts

Hi

I developed a script to populate a SharePoint site for testing. The script just loads a set of files from a data directory into memory and copies them to the directory structure provided (adding a random tag-number in the file name).

I am using FileOpen($destination,16+2), FileWrite($filehandle,$content) functions to copy the data.

The script works fine for some items and randomly fails with an error message: "Error Allocating Memory". Although, the memory never exceeded ~233 MB (both for Physical and Virtual Memory).

First failure: after about 28,000 files copied

Second failure: after about 45,000 files

Also, it once failed after just 643 files for a test to copy 20,000 files (which it did fine 3 times before it failed in the 4th try, for the same directory structure).

I did add a COM error handler in my script but that didn't capture it. (i have little experience with error handling in AutoIt).

Any help would be greatly appreciated.

Cheers,

Ankit

[topic="80940"] AutoScript Creator, Script to automate anything![/topic]

Link to comment
Share on other sites

Hi

I developed a script to populate a SharePoint site for testing. The script just loads a set of files from a data directory into memory and copies them to the directory structure provided (adding a random tag-number in the file name).

I am using FileOpen($destination,16+2), FileWrite($filehandle,$content) functions to copy the data.

Is it a recursive function? You may have just lost control of the recursion levels. Hard to tell without more code to examine.

The script works fine for some items and randomly fails with an error message: "Error Allocating Memory". Although, the memory never exceeded ~233 MB (both for Physical and Virtual Memory).

First failure: after about 28,000 files copied

Second failure: after about 45,000 files

Also, it once failed after just 643 files for a test to copy 20,000 files (which it did fine 3 times before it failed in the 4th try, for the same directory structure).

I did add a COM error handler in my script but that didn't capture it. (i have little experience with error handling in AutoIt).

Any help would be greatly appreciated.

Cheers,

Ankit

You'll need to post more for us to see why you are doing it like this rather than a simple FileCopy(), and where the problems might be.

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...