MyChat Server settings: "Disable scripts due to timeout"
If the script is written without optimization and has logical errors or loopings, it will be terminated.
This measure for avoiding server's freezes.
By default, this configuration is on to avoid repeated launches of such scripts if they process periodic events.