Assertion failure: MyClasses.pas, line 2651
-
upscene
-
upscene
We have reproduced Access violation only after killing process on the server. This way we emulated lost connection to the server.
You can get "lost connection during query" error because of unstable connection to your MySQL server or any other reasons that are described in this section of MySQL Reference Manual.
You can get "lost connection during query" error because of unstable connection to your MySQL server or any other reasons that are described in this section of MySQL Reference Manual.
-
upscene
You might want to read my e-mail on that...
Here's what I wrote:
I've done some monitoring at the server side.
If I start the test app, 1 connection is opened.
If I start the transfer, 1 additional connection is opened and
it executes the SELECT query.
Next, at some point in time, the SELECT finishes and the
connection for it is cleaned up (closed): it disappears from
the monitor.
From this point, it seems the application starts "processing".
After 3 minutes and 16-18 seconds, I get the error "lost
connection to server" when, apparently, reading/handling
the result. Which is weird, cause I can see the connection
was gone already.
From the monitor, I can still see 1 connection to the MySQL
server.
So, what is going on here? Is this error raised properly? Or
shouldn't it actually happen? Could it be that the .Next
triggers it?
Yes, the AV is fixed, but there's still something wrong here.
--
Martijn Tonies
Upscene Productions
Here's what I wrote:
I've done some monitoring at the server side.
If I start the test app, 1 connection is opened.
If I start the transfer, 1 additional connection is opened and
it executes the SELECT query.
Next, at some point in time, the SELECT finishes and the
connection for it is cleaned up (closed): it disappears from
the monitor.
From this point, it seems the application starts "processing".
After 3 minutes and 16-18 seconds, I get the error "lost
connection to server" when, apparently, reading/handling
the result. Which is weird, cause I can see the connection
was gone already.
From the monitor, I can still see 1 connection to the MySQL
server.
So, what is going on here? Is this error raised properly? Or
shouldn't it actually happen? Could it be that the .Next
triggers it?
Yes, the AV is fixed, but there's still something wrong here.
--
Martijn Tonies
Upscene Productions
> If I start the test app, 1 connection is opened.
This is main connection.
> If I start the transfer, 1 additional connection is opened
This connection is created in FetchAll=False mode. FetchAll is set automatically to False when UniDirectional is set True.
> it disappears from the monitor.
MyDAC doesn't close additional connection until all data is fetched. This means that the connection was closed by someone else. Most possibly this is MySQL server.
> Is this error raised properly?
We think that in the situation you have described error is raised properly. We don't get the error without any additional actions using your test application.
> Or shouldn't it actually happen?
When data is being fetched, MyQuery gets message from the network that the connection is closed. This raises error.
This is main connection.
> If I start the transfer, 1 additional connection is opened
This connection is created in FetchAll=False mode. FetchAll is set automatically to False when UniDirectional is set True.
> it disappears from the monitor.
MyDAC doesn't close additional connection until all data is fetched. This means that the connection was closed by someone else. Most possibly this is MySQL server.
> Is this error raised properly?
We think that in the situation you have described error is raised properly. We don't get the error without any additional actions using your test application.
> Or shouldn't it actually happen?
When data is being fetched, MyQuery gets message from the network that the connection is closed. This raises error.
-
upscene
I see the connection disappear, but after that, the application continues fetching data. "FetchRows" = 25, but I've seen if fetch hundreds of rows!> it disappears from the monitor.
MyDAC doesn't close additional connection until all data is fetched. This means that the connection was closed by someone else. Most possibly this is MySQL server.
The error seems to happen after 03:16 always.
The timeout on the server is the default number of seconds, which is much larger than that.
Really, how can this happen? How do you explain the monitor not showing the (additional) connection while it continues to fetch data?
--
Martijn Tonies
Upscene Productions
-
upscene
-
upscene
We have dedicated lot of time to this issue and tested it thoroughly. This appears to be a server OS problem (MySQL server settings are OK). We have reproduced this problem using standard libmysql.dll (Direct = False) and using standard dbExpress driver, which works through the libmysql.dll as well.
We have determined in which case client loses connection to server. Losing connection happens only if client slowly reads more than 155 KB from server. If client reads data without calling Sleep(), losing connection doesn't happen. It seems like a server OS forcibly closes slow connections.
We have determined in which case client loses connection to server. Losing connection happens only if client slowly reads more than 155 KB from server. If client reads data without calling Sleep(), losing connection doesn't happen. It seems like a server OS forcibly closes slow connections.
-
upscene
Hmm, that's odd...
In this particular case, as you can see, my application is transferring data from database A to database B, so a delay when reading records always happens.
So is this is a typical MySQL issue or a server OS issue. Weird.
So ... no chance I could fix this then?
--
Martijn Tonies
Upscene Productions
In this particular case, as you can see, my application is transferring data from database A to database B, so a delay when reading records always happens.
So is this is a typical MySQL issue or a server OS issue. Weird.
So ... no chance I could fix this then?
--
Martijn Tonies
Upscene Productions