Product and version - OS and version
FileMaker Pro Advanced 220.127.116.11 (MAC) connected to FileMaker Server 18.104.22.1688 (WIN)
also, FileMaker Pro Advanced 22.214.171.124 (MAC) connected to FileMaker Server 126.96.36.1998 (WIN)
The documentation for the Perform Script on Server describes a 1 million character limit that applies to script parameter and result. If the script result is larger then this limit, it appears to me that the FMSE thread wraps up cleanly, with the server returned to a normal state.
The client which was waiting for the script, normally beach balls while the script is running. However, even after the server has finished working, the client will continue to beach ball forever. To a typical user, it appears that they need to just keep on waiting.
The client script execution should resume after the failed PSoS step, and throw an error which we can catch with Get(LastError). It would also be ideal, if the "result exceeds limit" condition would be logged in some way on the server.
How to replicate
Create a client script that calls a server script using PSoS. Have the server script generate and exit with a result around 2 million characters.
It does appear that the client process is not completely hung or in a broken state. The server administrator can disconnect the client with an optional message.
The developer could manually monitor the length of potential script result and make efforts to avoid the condition. However, without any error reporting on the issue, or a Remote Debugger , a developer isn't likely to realize that they have a result near the limit.