Error on main_port, shutting down
This problem is specific to SuperServer. It usually happens when one of the client computers crashes in the middle of transition of some "big packet", leaving the connection in waiting state. The "big packet" could be a long SQL statement or some data from a table column (large varchars and BLOBs) whose size is bigger than packet size of network transport protocol (TCP/IP or NetBEUI).
When this happens, the SuperServer keeps waiting on that connection to finish sending data and blocks all other threads. It will time-out in the end, when first keepalive packet is sent and no reply is received (which by default happens after 2 hours). Meanwhile, all other connections also time out.
There are fixes for this in Firebird 2, so if you are using 1.x you should either upgrade or use Classic to prevent this from happening - or restart the Firebird server when you see it 'stuck'.