There isn't an easy way to track this down. However, I can give you some insight into what is happening that might help you to find it.
The API operates in a sort of cooperative multitasking system. There are lots of scripts running, and they each yield their execution every so often to allow other scripts to run. This happens when an event in a script finishes being processed, or when a script defers what it is doing using setTimout() or similar.
When scripts aren't yielding often enough (within 60 or 120 seconds, don't recall which) there is a separate process (a watchdog timer) that kills the sandbox because it assumes there is an infinite loop or it's otherwise locked up. "Possible infinite loop detected."
What this almost always turns out to be is a script trying to do too much when an event occurs. For example, finding every attribute in the game that contains some thing that looks like a die roll. What you want to look for is a script that's doing a findObjs() call with very little restriction and then processing all of the results in some expensive way. The way to fix it is to construct a list of results and a function that processes the next result and then calls itself with setTimeout(func,0). That 0 delay defers the execution until after a yield to the sandbox which prevents the possible infinite loop from the watchdog timer. I can get you an example of coding that if it will help.