Solved

Out of memory during request for 4201716 bytes, total sbrk() is 398184448 bytes!

Posted on 2004-09-21
5
1,269 Views
Last Modified: 2012-06-27
My Perl script generates the following error message:

Out of memory during request for 4201716 bytes, total sbrk() is 398184448 bytes!

Then, it dies. This does not occur during any constant iteration of my program, but typically after processing between 20,000 and 50,000 records from a MySQL database. The program's memory usage seems to cycle between 20 MB and 120 MB during normal operation, so I doubt that there is a memory leak. My OS is Windows XP, and I'm using Perl on Cygwin.

Any suggestions?

Thanks.
0
Comment
Question by:bobwood2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 10

Accepted Solution

by:
rj2 earned 500 total points
ID: 12120651
Try to use ActiveState Perl instead of Perl on Cygwin.

http://www.activestate.com/activeperl
0
 

Author Comment

by:bobwood2000
ID: 12127326
Okay, I'll try it, though ActiveState doesn't support the Expect.pm module, which I was planning on using.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12127756
The Expect module is available for ActiveState Perl.

http://aspn.activestate.com/ASPN/Modules/Perl/dist_html?dist_id=8808
0
 

Author Comment

by:bobwood2000
ID: 12129528
rj2 -- My program works flawlessly now that I'm using ActiveState Perl! Thank you. What made you suspect that the error was caused by the Perl interpretter rather than my code? I was questioning my code, and the database.

Tintin -- Your link suggests that Expect.pm is only supported by ActiveState on Linux. Am I missing something?
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12129726
Ahh.

I didn't look closely at the supported platforms, and I found this in the Expect.pm FAQ:

--
Can I use this module with ActivePerl on Windows?

Up to now, the answer was 'No', but this has changed (muchas gracias to Nick Scott )!

You still cannot use ActivePerl, but if you use the Cygwin environment (http://sourceware.cygnus.com), which brings its own perl, and have the latest IO::Tty (v0.05) installed, it should work (feedback appreciated).
--
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question