Well..if it was timing out I would be gettting a fatal error exception.
Though it could be some bizarre thing happening at low level where the connection is trying to close because of timeout and the read operation is trying to happen at the same time.
One possible thing might be that ..since I have scores of thousands of records and the script takes hours, maybe the default way in which the read op is done is causing a problem and I need to set commandbehavior to single row.
It's really weird...I will have to try it out on monday.
The query is a basic select thing with a where clause.