Do you ask why the question runs long, or why the long running question's connection fails after a while? The latter has been answered - the session entry for the port just times out. That is an failback mechanism in ScreenOS (and other firewalls) to free up needed resources which might else be tied to connections already terminated, but the closing flags have been lost. One example is described at
http://www.dbforums.com/oracle/1632094-keep-alive-sqlnet-ora.html.
The SQLNET.EXPIRE_TIME parameter described here is the only one I know of which will send kind of keep-alive with SQL*Net.