TMyQuery "pending freeze"

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
starhu
Posts: 34
Joined: Thu 13 Aug 2009 12:13

TMyQuery "pending freeze"

Post by starhu » Thu 09 May 2019 11:43

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!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TMyQuery "pending freeze"

Post by ViktorV » Fri 10 May 2019 09:48

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.

starhu
Posts: 34
Joined: Thu 13 Aug 2009 12:13

Re: TMyQuery "pending freeze"

Post by starhu » Fri 10 May 2019 10:58

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!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TMyQuery "pending freeze"

Post by ViktorV » Fri 10 May 2019 11:41

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.

starhu
Posts: 34
Joined: Thu 13 Aug 2009 12:13

Re: TMyQuery "pending freeze"

Post by starhu » Fri 10 May 2019 13:07

Thank you!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TMyQuery "pending freeze"

Post by ViktorV » Fri 10 May 2019 13:16

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.

Post Reply