 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
DLUTER
Joined: 16 Mar 2007 Posts: 44 Country: United States |
|
File size limitation with JAL filecopy? |
|
I'm moving backup files that are 15+ gb in size and i'm getting the following error.
"An error occurred while executing 24x7 script: Line 73: Error copying file "\\**SERVER**\Directory\SubDirectory\SERVER_2_3.tvzc". Error: 0 - The operation completed successfully."
The file is copied correctly but I'm wondering if this is a timeout issue or a filesize issue? I'm using the Filecopy command within 24x7.
Thanks for any help
David
|
|
Fri Oct 24, 2008 2:18 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7952
|
|
|
|
FileCopy internally calls Windows system function CopyFile and according to Microsoft documentation
-------------
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
-------------
24x7 senses zero return value and reports this as an error.
Here is my guess, which I cannot completely verify. the system CopyFile is a 32-bit function, meaning that the maximum number that can fit into an integer value for any parameter or return value is 4 GB. It likely returns some non-zero code indicating how many bytes have been copied or something like that. When copying files over 4 GB in size, something doesn't work internally and it is unable to report the correct return value, returning 0 instead. So while the file is copied correctly, the return code is not reliable, leading to a side effect in 24x7 reporting it as an error.
To remedy this issue, I suggest the following workaround
 |
 |
// copy file using custom error handling
OnErrorResumeNext
FileCopy . . .the same code that you have now. . .
GetLastError( error_message )
OnErrorStop
// now check error message for "completed successfully" sub-string, if present, jump to the end of job, else raise error
Pos( error_message, "completed successfully", 1, ok )
IfThen( ok, DONE )
// raise error
RaiseError( error_message )
DONE: |
|
|
Fri Oct 24, 2008 2:59 pm |
|
 |
DLUTER
Joined: 16 Mar 2007 Posts: 44 Country: United States |
|
|
|
Thanks, i'll give that a shot.
|
|
Fri Oct 24, 2008 4:54 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|