Application using ZEOS (mysql-4.1) takes ages to end

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
marek
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 01.11.2005, 15:14

Application using ZEOS (mysql-4.1) takes ages to end

Post by marek »

I have the following problem:
Sometimes it takes quite a time (5-10 seconds) for a application to end if it is using ZEOS/mysql41 (I'm using the 6.5.1/July release).

If I close the application, the forms get closed really fast, but I see that
some thread is waiting (somewhere inside ZEOS or the mysql-lib) for some
event, but after several seconds it finally terminates.

This does not happens always... I have some builds that finish fast (1sec)
and some takes ages. (I have no clue, what triggers the delay...)

Where can I look deeper to get the source of this problem?

I tried to close the ZConnection in the OnDestroy handler => no change
I also tried just using ZConnection/ZQuery (without gui releated DB stuff)
but no better results, sometimes it is slow and sometimes not.

Any clues? BTW, I'm using a server on localhost, so I assume no network-lag...

Regards
Marek
marek
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 01.11.2005, 15:14

Post by marek »

I found a "quick hack" solution after searching on the mysql buglist.

Adding WSACleanup to my finalization part of the program fixed the delay.

I hope I get no negative side effects with that hack, because I never initialized it.

Regards
Marek
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Can you explain more detailed?
marek
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 01.11.2005, 15:14

Post by marek »

Sorry,
but I have no clue, what should be explained in more detail?
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

How you implemented the usage of "WSACleanup". Could be a silly question, but I'm a newbie.. :)
marek
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 01.11.2005, 15:14

Post by marek »

uses winsock;

[...]

initialization
finalization
WSACleanup;
end.
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

ahh, so easy... I tought it was about DLL functions calling.. :) Thank you!
Post Reply