The box you are testing on doesn't have the same restrictions as the box where you are having problems. This is one of your problems.
Some ideas ...
Write a separate Perl program that uses a bunch of memory, like a large array ... does that disappear when you run it? Increase the array size. What about running several copies? Log information (eg "made it here") to a separate file or use warn (and check error log). Does that die right before the array is loaded?
Ask the VPS people what kind of warning you get if your programs exceed the memory limit. I bet you get no warning and nothing is logged anywhere. Maybe decrease the number of threads? Each thread only increases the memory.