If you give us more information we should be able to help.
Meanwhile, these old nodes might give you a clue as to what your problem might be:
General Areas to consider when faced with a Memory Leak
- Stability: Once your process grows to a certain size, does it stay there, or does it grow further over time?
- Large CPAN Modules. Are you using any?
- Circular references. See Eliminate circular reference memory leak using weaken (Perl Maven)
- File/Database handling.
- Tools. Try one or more from the following section.
- Profiling Memory Usage talk by Tim Bunce (YAPC::NA Austin Texas 2013 featuring Devel::SizeMe). Resident size vs vm size, rss, segments, /proc/pid/maps (e.g. SO maps question), malloc and the heap, perl internals, pads, constant folding, arenas, recursion, perl data structures (lots of pointers), ...
- Plans for adding memory profiling to Devel::NYTProf
- perlvar (search for "$^M")
- perldiag (search for "out of memory", "malloc", etc)
- perlfaq3 (search for "malloc", "how can I make my Perl program take less memory", ..., "perl -V:usemymalloc" displays value of "usemymalloc" configuration variable)
- INSTALL (Build and Installation guide for perl 5, ... search for malloc)
- perl malloc.c source code
Static Code Analysis References
Testing Concurrent Software References