Jump to content
Sign in to follow this  
ankitstr

Error Allocating Memory

Recommended Posts

ankitstr

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]

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.