Notice that the reported memory size of the Ruby application is growing? All
the swap gets consumed and the process dies. Looks like a memory leak
somewhere, though I could well be mistaken. Certainly, the process reporting
that it is using 4Gb of memory raise my eye brows.

As background, this script runs data collection against about 220 network
elements. The script is multithreaded, with the current thread count at 15.
Each thread will have a dedicated telnet session to the network element. The
data collected is sent straight to disk, then post-processed.

I don't have access to upgrading the hardware, the swap size at all, or the
ruby version easily.

Advertisements

I don't have access to upgrading the hardware, the swap size at all, or the
ruby version easily.

$ ruby -v
ruby 1.8.0 (2003-08-04) [sparc-solaris2.8]

Click to expand...

Sorry if you already were aware of this; but you should
typically be able to compile and install a version of
ruby in your home directory without any superuser privileges.
( ./configure --prefix ~/somedir )

Just wondering if that would give you the opportunity to
try a different ruby version?

Advertisements

With my multithreaded web-rick apps an exception thrown somewhere in
the code sometimes causes the memory used by ruby to spiral out of
control. True for me on Mac OS X with various 1.8.x installs. Hard
for me to repeat though, and when I have cleared all the exception
throwing bugs it goes away.

Not a lot of use, but perhaps a clue. I discovered it was the
exceptions causing the spiral by running the code with the tracer
enabled (which requires a lot of patience for an app of any size)

Click to expand...

Correct. Exceptions and the heavy use of ccalloc can result in this
memory leak. I got this report also from 2 of my ArachnoRuby users, but
somebody must find a small reproduceable script for this.

Just wondering if that would give you the opportunity to
try a different ruby version?

Click to expand...

Unfortunately, the customer here is really strict about software on their
production servers. I even need someone to run the commands whilst I watch
over their shoulder . To get a different version of Ruby is a process of
many weeks. Though it will happen in the end ..

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Ask a Question