Process was killed -- why? How can I find out?

Solution 1:

In general there’s no limit on accumulated CPU time for processes on macOS.

It seems likely that your program stopped due to issues such as bugs in the program, lack of memory, or similar. In order to find out what happened, try starting your program in the debugger and look at the backtrace.

In addition you should replace the signal handler in the program with one, that prints out which signal it receives. You could potentially also change the program not to kill itself when receiving the signal, but instead do something - like for example freeing up memory. It depends on the signal you’re receiving whether or not it can be ignored.