.net mysql read() method freeze
Hello, I'm getting a rather bizarre problem.
I am using mysql with c# and .net, visual studio 2005. I have a simple loop to read data based on a query until the results are exhausted:
Now...I am trying to go through many thousands of records...and this loop is sort of required to run for more than an hour. It works fine for a while... but in the middle it freezes.
In debug mode I found out that it freezes on the .Read() method, so the culprit is not my own code. if I try to step over Read() it simply stays there.
If I try to make it "continue" it simply returns to the freeze state. It does not terminate the application or throw an exception however.
What is going on and how can I fix it? Thank you for any help!!
Your server could be timing out on you.
What kind of a query are you using? Can it be changed so that it's more efficient?
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.
|All times are GMT +1. The time now is 12:35 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.