Re: in MySQL? Why it occured? How to correct it?
Posted by: Daniel Schneller
Date: May 19, 2005 03:56AM

As there is little information on the surrounding environment, the following assumes you use a Windows based server, version 4.1.12.

Maybe you are "suffering" from a fixed bug in the server. The net_read_timeout and net_write_timeout values were not honored on Windows till 4.1.12. Now they are and as far as I know default to 60 seconds.

Now if you have delays in your application between getting rows via the ResultSet that exceed this limit, the server closes the connection because it believes the client has gone away. We have seen this when using "Streaming ResultSets", but it might also happen if you leave the connection open and try to use it again.

There is even more more caveat with the streaming results: We ran into the problem although calls to the next() method of the resultset occured more frequently. However as the driver reads ahead larger chunks of data and buffers them in memory, the calls to next() do not necessarily involve network activity. This may lead to the timeout being hit anyway.

You might first try to increase the values for the timeouts on the server, to see, if the problem goes away. However it is not solved by that. Maybe you should consider using a connection pool that re-establishes connections when they were closed since the last use.

Options: ReplyQuote

Written By
Re: in MySQL? Why it occured? How to correct it?
May 19, 2005 03:56AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.