Click here to get back home

How to find memory leak in perl server

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to find memory leak in perl server Yuri Shtil 06-08-2008
Posted by Yuri Shtil on June 8, 2008, 3:11 pm
Please log in for more thread options
Hi All,
I have written an event driven network server in perl. However, when running
tests I see that the server process increases in memory and slows down.

How would you recommend to approach the problem? What to look for in order
to identify the cause of the memory leaks?

--
Y



Posted by Eric Pozharski on June 9, 2008, 4:01 am
Please log in for more thread options
[Followup-To set to c.l.p.m]

*SKIP*

> How would you recommend to approach the problem? What to look for in
> order to identify the cause of the memory leaks?

Find minimal example?

--
Torvalds' goal for Linux is very simple: World Domination

Posted by Ted Zlatanov on June 9, 2008, 11:42 am
Please log in for more thread options

YS> I have written an event driven network server in perl. However, when running
YS> tests I see that the server process increases in memory and slows down.

YS> How would you recommend to approach the problem? What to look for in order
YS> to identify the cause of the memory leaks?

Do you create variables?

Do you keep their contents around after you need them?

Generally, Perl will use as much memory as you need, but there's a
threshold where that gets annoying (perhaps due to memory fragmentation
or too much memory used--it really depends on what your process does)
and you're better off exiting and restarting. It's best to use as
little memory as possible and allocate new memory as infrequently as
possible if you want to run forever. Whether this is feasible with your
server, we don't know.

Ted

Similar ThreadsPosted
Memory leak with XMLRPC and Perl... January 31, 2007, 2:25 am
Memory leak with XMLRPC and Perl... January 31, 2007, 2:25 am
Memory leak in Perl 5.10 on Solaris 10 with %ENV January 10, 2008, 9:58 am
memory leak in 5.8.2??? March 22, 2005, 2:32 pm
memory leak in 5.8.2??? March 22, 2005, 2:32 pm
Memory leak with Inline::C July 11, 2004, 8:15 pm
Memory leak with Inline::C July 11, 2004, 8:28 pm
Win32::API memory leak? January 14, 2005, 6:15 pm
memory leak in loop April 15, 2005, 10:54 am
Memory leak in loop when not using "my" - why? July 19, 2005, 2:30 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap