473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

urgent! ask help: Perl Out of memory on HP 3000 MPE/iX

Hi all,
This is the first time to post question here, hopefully experts of perl here can give me a hand, to be honest, I am kind of new to perl, and I am struggling with the "Out of memory" issue I met when running my scripts.

Could somebody pay attention to look into the below details to give some help?
Really appreciate!!!!!



Let me give deatail info:
OS: HP 3000 MPE/iX.
Note: No "out of memory" on Winxp env, on xp I can run the script with 3 hours successfully.

What does my script do:
get the input parameter from command line, send those parameters to a web service server, write the the ruturn from the webservice server to disk file,
which the ruturn is a long string.

To stress the web service server, I need to run the script for a long time, here it
is 3 hours, so ideally within the 3 housr, the script will call the web service
with many many loops.

Error:
After a few miniutes running, acutally it has run successfully with more than 100 loops, the perl got terminated by "out of memory" error.
The error was print from STDERR.
open STDERR, ">$errlog" or die "Can't dup STDERR $!";
Error message:
sometime, it is just "Out of Memory!", some time it gives like below:

Out of memory during "large" request for 135168 bytes at /PERL/PUB/lib/perl5/site_perl/5.6.0/HTTP/Message.pm line 100.


The bleow is main code of the time and loop control, also the web service invoke:

#loop for the given runnning time

my $start_G=time();
while (2>1) {
#time control
my $start = time();
$elapsetime = $start - $start_G;
if ($elapsetime >= $runtime) {
print "\nTimeout and exit!!!";
exit 1}

$Loop++;
my $loopstart = time();
print "******$now******\nNow running for Loop $Loop!!!\n\n";

&ws_call;

my $loopend = time();
print "Time taken for loop $Loop was ", ($loopend - $loopstart), " seconds.\n\n";
my $end = time();
print "Time taken for getAdvice by CheckID: $check_id was ", ($end - $start), " seconds\n\n";
my $end_G = time();
$elapsetime = $end_G - $start_G;
print "Time elapsed $elapsetime seconds\n\n";
}


sub ws_call {
my $soap =
new SOAP::LITE->proxy( $clic_preferences{SERVICE_HOST} )
->uri('http://www.xxxx')
;
my $header =
SOAP::Header->name( accountName => $client_id )
->uri('http://www.xxxx')->prefix('mi');

print "Calling getAdvice...\n";

my @params = (
SOAP::Data->name(string => $check_id),
$header
);

my $method =
SOAP::Data->name('getAdvice')
->attr( { xmlns => 'http://www.xxxx' } );

$result = $soap->call( $method => @params );

$returnvalue = $result->result;
if( $result->fault ) {
print "Error returned from server!\n";
}

if(defined $returnvalue) {
#WRITE TO File
print "\nWriting advice to file...";
open( OUT_FILE, ">$adviceFileName" )
or die "Cannot open output file $adviceFileName\n$!";
$returnvalue =~ s/\x0D//g;
print OUT_FILE $returnvalue;
#END OF WRITE

$countPass++;
} else
{
print "\n\nNo return value!\n";
}
}#end ws_call
Oct 22 '06 #1
1 2507
Actullay, each loop has the same input parameter and has the same return string, also the string is not too big, just a copule of kBtye.
Oct 22 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Johnson Ndiovu | last post by:
This is a multi-part message in MIME format --af4b847f-30bf-4b8d-acf1-2909de953a6e Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable DEAR FRIEND, ...
1
by: Heros | last post by:
I had losed my serial key for .net Visual Studio Professional, DVD ROM with the trial version, 60 days, and need urgent to use it to install .net Visual Basic. Please, its urgent. Thanks.
5
by: VbUser25 | last post by:
hi i need urgent responses.. i have some 15 checkboxex on a form... i want to 1st check the no. of checkboxes that are checked?? and then loop it that many times adn insert the quantities the...
3
by: Rob | last post by:
I have a form - when you click the submit button, it appends a variable to the URL (e.g. xyz.cgi?inputID=some_dynamic_variable) It also opens a new page. Now, that some_dynamic_variable is...
9
by: Stefan Bauer | last post by:
Hi NG, we've got a very urgent problem... :( We are importing data with the LOAD utility. The input DATE field data is in the format DDMMYYYY (for days) and MMYYYY (for months). The target...
3
by: gani | last post by:
hi, how to get the fullpath of created IsolatedStorage directory. thanks. -- gani
28
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
1
by: samir dsf | last post by:
hi this is kinda urgent ... i will insert some data in html format..i just need to know how to disply it back.its urgent...so if anyone can suggest pls tell me i simply need to know that if i...
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
7
by: Cirene | last post by:
I used to use the Web Deployment Project with my VS2005 projects. Now I've fully upgraded to VS2008. Do I have to download a new version of the Web Deployment Project? If so where can I find...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.