Several limitations are applied to scripts when they are run. The limits should be more than sufficient for most scripts and are designed to catch erroneous scripts. These are detailed below here.
Scripts can run for no longer than 60 seconds. After running for 60 seconds the logs at that time will be collected and then the code will be terminated. Any logs from the first 60 seconds of execution will be logged in the Logging page.
Event Rate Limiting
Script Jobs and Script Listeners for the same principle (Pages, Spaces, User, etc) are restricted to 60 in a minute. When the limit is exceeded events will be dropped for that particular principle, other events are not affected. Any executions that are dropped are logged and can be found in the Logging.
Whilst you can import packages into your scripts in the Script Console, Script Listeners, you can only import from the standard Java 8 SE classes and the following libraries:
Script Listeners, Script Jobs and CQL Script Jobs Storage
At the moment, the maximum amount of code that can be stored across all Script Listeners is 32KB.
So, if one Script Listener contains 30KB of code then all your other Script Listeners must only contain 2KB of code between them.
The same applies for Script Jobs and CQL Script Jobs.