LibMySQL.dll and Lost connections during Query
LibMySQL.dll and Lost connections during Query
Hi
I now have several different version of this library located in many different folders on my programming pc and my live servers.
Do I need to have the same version on my PC as on my servers?
I am running mysql 4.0, wich LibMySQL.dll is the correct one and where do I place it to make sure its the right same one I use on my PC and servers?
I now have several different version of this library located in many different folders on my programming pc and my live servers.
Do I need to have the same version on my PC as on my servers?
I am running mysql 4.0, wich LibMySQL.dll is the correct one and where do I place it to make sure its the right same one I use on my PC and servers?
Last edited by TheLion on Mon 13 Dec 2004 13:45, edited 1 time in total.
Re: LibMySQL.dll
If you work with TMyConnection.Options.Direct := True (by default) libmysql.dll isn't used.
But if even not version of the client doesn't have a great importance.
But if even not version of the client doesn't have a great importance.
OK.
But I have just added the TMyConnection.Options.Direct := False, due to your answer on another question. Does this result in other bugs?
But I have just added the TMyConnection.Options.Direct := False, due to your answer on another question. Does this result in other bugs?
We reproduced and fixed this error. Usually it happens on the execution of long queries. Fix of the problem will be available with the next version in about two weeks.
As a temporary solution you can set TMyConnection.Options.Direct := False
Well. What I am really trying to do, is limit the Lost connections I get
Here is part of the code I use to retry and hopefully complete a Query.
Normally fRetries := 10; But sometimes it isn't enough.
The 2 most used tables are also the ones I loose connection to most of the time.
The tables is status tables with 6 and 7 fields and from 4 to 24 rows.
The Select Statements that fails is
SELECT * FROM tmlstatus WHERE tlineno=1
and
SELECT * FROM programstatus WHERE name="TML" AND computername="DKTML001"
What can I do more, to try to get a query succesfully done? Should I put some disconnect/Reconnect code in the TFRMySQL.ErrorMyConnection procedure? Do you have any surgestions?
Here is part of the code I use to retry and hopefully complete a Query.
Normally fRetries := 10; But sometimes it isn't enough.
Code: Select all
...
SQLDone := False;
RetryNo := 0; // records the number of failed link to the SQL server
while (Not SQLDone) and (RetryNo 0 then // if Row(s) returned then point to the first row
fMyQuery.First; // fails if there isn't any row to choose. Hence the if statement
SQLDone := True;
except
Inc(RetryNo);
Sleep(250); // Wait if we have an error
end;
...
The tables is status tables with 6 and 7 fields and from 4 to 24 rows.
The Select Statements that fails is
SELECT * FROM tmlstatus WHERE tlineno=1
and
SELECT * FROM programstatus WHERE name="TML" AND computername="DKTML001"
What can I do more, to try to get a query succesfully done? Should I put some disconnect/Reconnect code in the TFRMySQL.ErrorMyConnection procedure? Do you have any surgestions?
Yes. It happens wether its True or False. Have not been running with the False settings for more than a few days, but it still happens. To soon to tell if it happens more or less. The last time a Query on one of our live servers failed (lost connection 10 times in a go) was 16:04 (GMT). Thats about 15-20 minuttes ago. It was a simple select query:
SELECT * FROM staff WHERE account=147 AND staffno=2619
I got 10 lines like this one in my error log:
16:04:59.328: [TTLLStaff.ErrorMyConnection] Lost connection to MySQL server during query
SELECT * FROM staff WHERE account=147 AND staffno=2619
I got 10 lines like this one in my error log:
16:04:59.328: [TTLLStaff.ErrorMyConnection] Lost connection to MySQL server during query
Do you use any locking for this table? Can it be that working with this table differs from working with another tables?
According to the same behaviour on using different clients (Direct := True,False), the problem isn't in MyDAC but in the server. Try to look for a correlation with the execution of another queries to the same table. Especially, UPDATE.
Also you can try to execute SELECT with modifier HIGH_PRIORITY.
According to the same behaviour on using different clients (Direct := True,False), the problem isn't in MyDAC but in the server. Try to look for a correlation with the execution of another queries to the same table. Especially, UPDATE.
Also you can try to execute SELECT with modifier HIGH_PRIORITY.
Thank you for your answer. Gave me some things to look at
Don't use any locking on any tables, except for the nightly backup. I work in the same way wiith all my tables. So it don't differ.
I have crossreferenced my logs for all my services running on my systems. I can se that my programs sometimes read and writes to my 2 status tables several to many times a second. That is perhaps not a good idea On one system I have 5 programs on 2 servers doing this. On my other system I have 7 programs on 3 servers figthing to get through to these status tables.
I can se that when one of my status tables "fails", the following queries and posts to other tables fails aswell!!! But only in the same program/connection. The other programs seems unaffected, until they in "turn" fails.
I am using MySam tables, would it be better using InnoDB or any of the other engines?
Is there any way of finding out how much my installations of MySQL can handle when working through MyDAC?
Don't use any locking on any tables, except for the nightly backup. I work in the same way wiith all my tables. So it don't differ.
I have crossreferenced my logs for all my services running on my systems. I can se that my programs sometimes read and writes to my 2 status tables several to many times a second. That is perhaps not a good idea On one system I have 5 programs on 2 servers doing this. On my other system I have 7 programs on 3 servers figthing to get through to these status tables.
I can se that when one of my status tables "fails", the following queries and posts to other tables fails aswell!!! But only in the same program/connection. The other programs seems unaffected, until they in "turn" fails.
I am using MySam tables, would it be better using InnoDB or any of the other engines?
Is there any way of finding out how much my installations of MySQL can handle when working through MyDAC?
It seems this issue is already out of MyDAC functionality. Try to experiment with options UPDATE and SELECT or ask a question at MySQL forum.
> I am using MySam tables, would it be better using InnoDB or any of the other engines?
All of them have advantages and imperfections. For status table MyISAM must be more suitable.
> I am using MySam tables, would it be better using InnoDB or any of the other engines?
All of them have advantages and imperfections. For status table MyISAM must be more suitable.