I agree with Neil, I doubt it's a problem with running as a phantom. It's probably a bug in the process that's independent of the phantom. Phantom processes should be set up to log their output to a file. Do you have any logs of what it's doing? If it crashes it should have an error being logged. If it's not logging itself, maybe you could run it in a terminal session to see what it's doing.
Independent of the phantom, calling a subroutine over and over shouldn't be a problem unless it's a nested call. A subroutine that calls itself over and over can eventually run out of stack space and crash.