Hello,
My program connects to a MySql database using Internet.
Sometimes, a few times a day the program freezes because a simple select causes "pending" state forever.
In the DbMonitor I can see that the same select previously took only 0,032 seconds to finish and later it caused a "forever pending".
I started the program in second instance and that was Ok. What can cause this kind of freezing? Thank you!
TMyQuery "pending freeze"
Re: TMyQuery "pending freeze"
It means that an operation started but not yet completed.
To solve the issue, please try assigning the value of TMyQuery.CommandTimeout property to a value other than 0: https://devart.com/mydac/docs/devart.my ... imeout.htm.
To solve the issue, please try assigning the value of TMyQuery.CommandTimeout property to a value other than 0: https://devart.com/mydac/docs/devart.my ... imeout.htm.
Re: TMyQuery "pending freeze"
Hello Victor,
Thank you for the answer.
The problem is that no matter if I would set the timeout for example to 10 seconds because as I wrote before most of the times the queries are very fast, but when occasionally they do this, they will stuck literally forever.
Last time I personally waited 20 minutes and it didn't end.(I needed to kill the program in the task manager)
In the DbMonitor the time is "n/a"
So the real question is : what can cause this problem? Is it a server or client side problem?
Thank you very much!
Thank you for the answer.
The problem is that no matter if I would set the timeout for example to 10 seconds because as I wrote before most of the times the queries are very fast, but when occasionally they do this, they will stuck literally forever.
Last time I personally waited 20 minutes and it didn't end.(I needed to kill the program in the task manager)
In the DbMonitor the time is "n/a"
So the real question is : what can cause this problem? Is it a server or client side problem?
Thank you very much!
Re: TMyQuery "pending freeze"
We haven’t been able to identify what causes the issue, since we couldn’t reproduce it. You can try using SHOW PROCESSLIST to search for the issue cause: https://dev.mysql.com/doc/refman/8.0/en ... slist.html.
If the problem is on the server side, you’ll be able to see the “zombie” query and kill it with the KILL command: https://dev.mysql.com/doc/refman/8.0/en/kill.html
If this method doesn’t help, please compose a small test sample including the script for creating and filling in the database objects that would demonstrate the described behavior and send it to us via the contact form https://devart.com/company/contactform.html so that we could research the issue further.
If the problem is on the server side, you’ll be able to see the “zombie” query and kill it with the KILL command: https://dev.mysql.com/doc/refman/8.0/en/kill.html
If this method doesn’t help, please compose a small test sample including the script for creating and filling in the database objects that would demonstrate the described behavior and send it to us via the contact form https://devart.com/company/contactform.html so that we could research the issue further.
Re: TMyQuery "pending freeze"
Thank you for the interest to our product.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.