My perl script is a very big script and performs a lot of complex tasks. One of the tasks within the script is to calulate the size of a file as follows:
$size = -s $filename;
$size = -1 unless defined($size);
When the file size is larger than 1GB for example 16376862124 bytes or 16 GB, the script returns $size = -1
For a file size less than 1 GB for example 775752944 bytes,
the correct file size is returned.
When I run another sample script performing just the above simple task of calculating file size, the correct size of 16376862124 bytes is returned for the larger file after a long time-about 40 minutes. The problem arises when the above task is within the larger script.
Can sombody suggest a solution to this problem?
I think perhaps it is a timing issue and in the larger script after a fixed time of 20 minutes or so, the perl interpreter moves to the next task/command in the script.
Is there someway I can increase the time limit to execute any command?
What is the default time limit set by the interpreter to execute any command?
Please suggest a solution to my problem.
-Thanks,
Regards,
Gauri
$size = -s $filename;
$size = -1 unless defined($size);
When the file size is larger than 1GB for example 16376862124 bytes or 16 GB, the script returns $size = -1
For a file size less than 1 GB for example 775752944 bytes,
the correct file size is returned.
When I run another sample script performing just the above simple task of calculating file size, the correct size of 16376862124 bytes is returned for the larger file after a long time-about 40 minutes. The problem arises when the above task is within the larger script.
Can sombody suggest a solution to this problem?
I think perhaps it is a timing issue and in the larger script after a fixed time of 20 minutes or so, the perl interpreter moves to the next task/command in the script.
Is there someway I can increase the time limit to execute any command?
What is the default time limit set by the interpreter to execute any command?
Please suggest a solution to my problem.
-Thanks,
Regards,
Gauri