Search found 18 matches

by earlati
Fri 18 May 2012 14:58
Forum: MySQL Data Access Components
Topic: Can't connect to MySQL server on 'localhost' (10061)
Replies: 1
Views: 6928

Can't connect to MySQL server on 'localhost' (10061)

On a single server I have a group of programs connected to a mysql server using MyDAC.
All the programs works well despite, from time to time, all the programs, at the same time, can no more access the mysql database.
The error reported on my logs are like this:

[17/05/2012 14.06.31] [ThrID=0908] [TThreadPMV::InitPMV]ERRORE Can't connect to MySQL server on 'localhost' (10061)

Socket error on connect. WSAGetLastError return 10048($2740)


To solve the problem I have to close all the programs , and sometimes also the mysql db, and after that I restart te programs and all goes well again.

It's seem that for some reason the mydac goes out of work and I want to check what should cause such problem.
Mybe my programs require to much resources to mydac but I didn't kwnow how to check this.
Where can I search to find if mydac has reached some limits or have some internals errors ?

I have BCB 6 with mydac 4.3 and mysql 5.0

Rgards, E. Arlati
by earlati
Tue 06 May 2008 06:09
Forum: dbForge for MySQL
Topic: "Commands out of sync" issue
Replies: 7
Views: 6554

Duke wrote:We'll notify you when the problem gets solved.
I will be interested in such issue, though I have similar problem.
Please notify also me about the priblem solution


regards, Enzo
by earlati
Tue 14 Feb 2006 08:20
Forum: MySQL Data Access Components
Topic: ReceiveHeader : Net packets out of order : received[0], expexted[1]
Replies: 30
Views: 40929

Re: ReceiveHeader : Net packets out of order : received[0], expexted[1]

CFaiga wrote:some times I get the error message
ReceiveHeader : Net packets out of order : received[0], expexted[1]
My software then stops working
any ideas ?
Just an hint:
I got this problem when I forgot the same connection inside different thread ( maybe a global connection or just one connection passed as parameter ).
Only a connection in the main program, called by a timer or inside the ActionList.Update method lead to this problem.

I hope this should help
by earlati
Tue 14 Feb 2006 08:14
Forum: MySQL Data Access Components
Topic: more on TMConnection.PoolingOptions.ConnectionLifetime
Replies: 2
Views: 2235

Just another question about PoolingOptions:
There is a way to query a connections in order to get number of connections used and available.
by earlati
Tue 14 Feb 2006 08:12
Forum: MySQL Data Access Components
Topic: more on TMConnection.PoolingOptions.ConnectionLifetime
Replies: 2
Views: 2235

more on TMConnection.PoolingOptions.ConnectionLifetime

The behaviour of paramenter ConnectionLifetime is not clear to me.
Inside the help is not specified the unity of measure used for this value.
that is:
TMConnection.PoolingOptions.ConnectionLifetime = 10
mean 10 seconds or milliseconds or others.

And another questionon this topic:
what exactly happen when I reach this timeout and I have a query still running, or a thread which hold ( which must create and remove ) is till keeping it , for a later use of this connection.

The help told onlu what is reported belowe, which is not enoth clear to me and search on internet for more explanation, but I found nothing.

ConnectionLifetime: Specifies the maximum time in which opened connection can be used by connection pool. Pool deletes connections with exceeded connection lifetime when TCustomDAConnection is about to close. If set ConnectionLifetime property to 0 (by default), then life time of connection is infinity.

Regards, Enzo
by earlati
Tue 07 Feb 2006 16:59
Forum: MySQL Data Access Components
Topic: Random ASSERTION when create a new TMyConnection at run-time
Replies: 3
Views: 2140

Ikar wrote:Try downloading last version of MyDAC (3.55.0.25). If problem persists then send us complete small sample to demonstrate it, including script to
create server objects.
I have moved to the rev. 4.3.
The assertion error din't appear anymore, tough I got from time to time an EaccessViolation without futher iformation.
But this should be due to other problem, I'm still investigating on that, so consider the original error as resolved.

Regards and many thanks, Enzo Arlati
by earlati
Tue 07 Feb 2006 07:53
Forum: MySQL Data Access Components
Topic: error when I assign OnError event to TMyConnection
Replies: 5
Views: 3744

Ikar wrote:Please look at the MyLoader demo, OnGetColumnData event. For more information see C++ Builder Help about events handling.
But the MyLoader demo is written in delphi, which is a lot simpler to write and also in C++ I already used the assignement of event at run-time in othet situation without problem.
Just in the reported example , when I try to assign the onError event I give the error.
Please ,do someone have some working example wirtten in BCB with OnError event assignment ?
by earlati
Mon 06 Feb 2006 16:12
Forum: MySQL Data Access Components
Topic: field truncate trying to using 'show slave status'
Replies: 16
Views: 7849

Ikar wrote:> I'm using mysql 5 and maybe the client 4.1.3 should not be full compatible.

No, problem is on server side.

> You told that mydac 4.00 have resolved the problem, what you mean exactly, how is solved the problem ?

MyDAC will parse SQL and detect 'SHOW SLAVE STATUS' statement. If it is found then MyDAC sets fake values to field length.
Today I registered to Mydac 4.30.
The problem were resolved, as you said, so I'm no more interested in a patch for the rev 3.5
by earlati
Mon 06 Feb 2006 09:32
Forum: MySQL Data Access Components
Topic: Random ASSERTION when create a new TMyConnection at run-time
Replies: 3
Views: 2140

Re: Random ASSERTION when create a new TMyConnection at run-time

earlati wrote:Random ASSERTION when create a new TMyConnection at run-time

From time to time, maybe after 1 o 2 day of working an application of mine give me the following error:
[05/02/2006 5.16.30] [DataModule_PMV::NewMyConnection]
ERRORE Assertion failure (D:\Projects\Delphi\MyDac\Source\MySqlApiDirect.pas, line 205) ............

inside a routine which build at run-time a new connections to mysql

I'm using BCBBuilder6, mydac 3.5 and mysql 5.0 and belowe I report the function which generate the new TMyConnection object at run-time.
During the normal working the same routine , generate hundred of temporary connection at run-time, but only after several hours or days of working I get this error.
This alert are not trapped by try--catch block, so I can't manage it.
Also , is possible that the alert prompt me a dialog box and this is blocking my program, which is a service, which hangs.

I have not the source of mydac, so I couldn't make more investiogation on this error.
Can you help me ?

Regards, Enzo Arlati
I forgot the routine I using to build the new connection, maybe it should help someway.
And another important think, a reported a FALSE information in my previous message, I said the alert error where not trapped by the try--catch block, I just make an ERROR and I apologise, the alert is trapped correctly by try--catch block.


TMyConnection * __fastcall TDataModule_PMV::NewMyConnection(String hostName)
{
String strmsg;
TMyConnection * myConn = 0;

try
{
myConn = new TMyConnection( NULL );
myConn->Pooling = false;
myConn->Server = hostName;
myConn->Database = "my_db";
myConn->Username = "my_user";
myConn->Password = "my_password";
myConn->LoginPrompt = false;
strmsg = Format( "(conn: %s.%s.%s) ",
ARRAYOFCONST(( myConn->Server,
myConn->Database,
myConn->Username )) );
myConn->Connected = true;
}
catch( Exception & ex )
{
String serr;
serr = Format( "[DataModule_PMV::NewMyConnection] ERRORE %s %s ",
ARRAYOFCONST(( ex.Message, strmsg )) );
Util::mylog( serr );
RemoveMyConnection( myConn );
myConn = 0;
}
return myConn;
}
by earlati
Mon 06 Feb 2006 09:26
Forum: MySQL Data Access Components
Topic: Random ASSERTION when create a new TMyConnection at run-time
Replies: 3
Views: 2140

Random ASSERTION when create a new TMyConnection at run-time

Random ASSERTION when create a new TMyConnection at run-time

From time to time, maybe after 1 o 2 day of working an application of mine give me the following error:
[05/02/2006 5.16.30] [DataModule_PMV::NewMyConnection]
ERRORE Assertion failure (D:\Projects\Delphi\MyDac\Source\MySqlApiDirect.pas, line 205) ............

inside a routine which build at run-time a new connections to mysql

I'm using BCBBuilder6, mydac 3.5 and mysql 5.0 and belowe I report the function which generate the new TMyConnection object at run-time.
During the normal working the same routine , generate hundred of temporary connection at run-time, but only after several hours or days of working I get this error.
This alert are not trapped by try--catch block, so I can't manage it.
Also , is possible that the alert prompt me a dialog box and this is blocking my program, which is a service, which hangs.

I have not the source of mydac, so I couldn't make more investiogation on this error.
Can you help me ?

Regards, Enzo Arlati
by earlati
Mon 06 Feb 2006 08:51
Forum: MySQL Data Access Components
Topic: error when I assign OnError event to TMyConnection
Replies: 5
Views: 3744

error when I assign OnError event to TMyConnection

I'm using BCBBuilder 6 with mydac 3.5
I have a function like the one belowe.
I'm tryng to add evento OnError using
myConn->OnError = MyConnectionSIVError;
but I got this error at compile time:
[C++ Error] Unit_DM1.cpp(136): E2034 Cannot convert 'void (_fastcall TDataModule_PMV::*)(TObject *,EDAError *,bool &)' to 'void (_fastcall * (_closure )(TObject *,EDAError *,bool &))(TObject *,EDAError *,bool &)'

what I'm wrong ?

TMyConnection * __fastcall TDataModule_PMV::NewMyConnection(String hostName)
{
String strmsg;
TMyConnection * myConn = 0;

try
{
myConn = new TMyConnection( NULL );
myConn->OnError = MyConnectionSIVError;
myConn->Pooling = false;
myConn->Server = hostName;
myConn->Database = "pmv_manager";
myConn->Username = "pmv_manager";
myConn->Password = "pmv_manager";
myConn->LoginPrompt = false;
strmsg = Format( "(conn: %s.%s.%s) ",
ARRAYOFCONST(( myConn->Server,
myConn->Database,
myConn->Username )) );
myConn->Connected = true;
}
catch( Exception & ex )
{
String serr;
serr = Format( "[DataModule_PMV::NewMyConnection] ERRORE %s %s ",
ARRAYOFCONST(( ex.Message, strmsg )) );
Util::mylog( serr );
RemoveMyConnection( myConn );
myConn = 0;
}
return myConn;
}


where MyConnectionSIVError is defined inside published section as:
void __fastcall MyConnectionSIVError(TObject *Sender, EDAError *E, bool &Fail);


regards, Enzo Arlati
by earlati
Wed 11 Jan 2006 16:20
Forum: MySQL Data Access Components
Topic: field truncate trying to using 'show slave status'
Replies: 16
Views: 7849

Ikar wrote:OK. In nearest build we will set Slave_IO_State to 80 and Last_Error to 2048.
I see that mydac 3.55 , is based on mysql client library 4.1.3.
It is not possible that this should be the cause of the wrong size value.
I'm using mysql 5 and maybe the client 4.1.3 should not be full compatible.
You told that mydac 4.00 have resolved the problem, what you mean exactly, how is solved the problem ?
by earlati
Tue 10 Jan 2006 17:01
Forum: MySQL Data Access Components
Topic: field truncate trying to using 'show slave status'
Replies: 16
Views: 7849

Ikar wrote: We don't want to change fieldtype and it's too long for TStringField. In
your case, is it enough to set Slave_IO_State length to 40, and
Last_Error length to 256?
A length of 40 for Slave_IO_State should be enough , also if 80 char should be better.
For Last_Error is required more space because it return the whole sql , in some case a stored procedure.
A value of 2k should be enough in most case, but is better 32k or at least 16k ( in few owrds it should be the bigger possible )
by earlati
Tue 10 Jan 2006 14:00
Forum: MySQL Data Access Components
Topic: field truncate trying to using 'show slave status'
Replies: 16
Views: 7849

Ikar wrote:> We don't know way to avoid this problem without making changing to MyDAC or MySQL server code. If you have MyDAC Pro-version then send us (mydac*crlab*com) your license number and we will send small MyDAC patch to you.
.
I have the standard version.
I upgrade it from rev 3.50 to 3.55 but the file are truncated again.


Ikar wrote: Please check truncated fields once more and specify their expected
maximum length.
what I heed at present is the field Last_Error, which should have a very huge length ( I don't know what is is real limit ).
I suppose a limit of 32k should be enough.
by earlati
Mon 09 Jan 2006 15:17
Forum: MySQL Data Access Components
Topic: field truncate trying to using 'show slave status'
Replies: 16
Views: 7849

Ikar wrote:We will add code to avoid this problem in nearest build of MyDAC 3.55. Most likely, it will be available at the end of month.
thanks, please if it is possible to get some hints to fix it by myself I would appreciate. I have to install on customer site before the end of the moth.
Ikar wrote:Do you notice this problem only for Slave_IO_state field?
I reported belowe the output I get from the standard mysql client and the one I get using MYDAC ( with some truncated values )

Code: Select all

  mysql> show slave status\G
*************************** 1. row ***************************
             Slave_IO_State: Waiting for master to send event
                Master_Host: 192.168.201.120
                Master_User: replicant
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: pmv_manager_log_bin.000002
        Read_Master_Log_Pos: 387980
             Relay_Log_File: Arlati-E-relay-bin.000002
              Relay_Log_Pos: 614
      Relay_Master_Log_File: pmv_manager_log_bin.000002
           Slave_IO_Running: Yes
          Slave_SQL_Running: No
            Replicate_Do_DB:
        Replicate_Ignore_DB:
         Replicate_Do_Table:
     Replicate_Ignore_Table: pmv_manager.lista_fep,pmv_manager.parametri_configurazione
    Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
                 Last_Errno: 1064
                 Last_Error: Error 'You have an error in your SQL syntax; check the manual that corresponds to ......            
               Skip_Counter: 0
        Exec_Master_Log_Pos: 467
            Relay_Log_Space: 388127
            Until_Condition: None
             Until_Log_File:
              Until_Log_Pos: 0
         Master_SSL_Allowed: No
         Master_SSL_CA_File:
         Master_SSL_CA_Path:
            Master_SSL_Cert:
          Master_SSL_Cipher:
             Master_SSL_Key:
      Seconds_Behind_Master: NULL

===================================

Code: Select all

fld[1/33] len=61 name=[Master_Host] value=[192.168.201.120] 
   fld[2/33] len=17 name=[Master_User] value=[replicant] 
   [ThrID=0944] [ClientXML] CONNESSIONE A 192.168.200.218 FALLITA
   fld[3/33] len=0 name=[Master_Port] value=[33  
   fld[4/33] len=0 name=[Connect_Retry] value=[60] 
   fld[5/33] len=512 name=[Master_Log_File] value=[pmv_manager_log_bin.000002] 
   fld[6/33] len=0 name=[Read_Master_Log_Pos] value=[342974] 
   fld[7/33] len=512 name=[Relay_Log_File] value=[Arlati-E-relay-bin.000002] 
   fld[8/33] len=0 name=[Relay_Log_Pos] value=[614] 
   fld[9/33] len=512 name=[Relay_Master_Log_File] value=[pmv_manager_log_bin.000002] 
   fld[10/33] len=3 name=[Slave_IO_Running] value=[Yes] 
   fld[11/33] len=3 name=[Slave_SQL_Running] value=[No] 
   fld[12/33] len=20 name=[Replicate_Do_DB] value=[] 
   fld[13/33] len=20 name=[Replicate_Ignore_DB] value=[] 
   fld[14/33] len=20 name=[Replicate_Do_Table] value=[] 
   fld[15/33] len=23 name=[Replicate_Ignore_Table] value=[pmv_manager.lista_fep,p] 
   fld[16/33] len=24 name=[Replicate_Wild_Do_Table] value=[] 
   fld[17/33] len=28 name=[Replicate_Wild_Ignore_Table] value=[] 
   fld[18/33] len=0 name=[Last_Errno] value=[1064] 
   fld[19/33] len=20 name=[Last_Error] value=[Error 'You have an e] 
   fld[20/33] len=0 name=[Skip_Counter] value=[0] 
   fld[21/33] len=0 name=[Exec_Master_Log_Pos] value=[467] 
   fld[22/33] len=0 name=[Relay_Log_Space] value=[343121] 
   fld[23/33] len=6 name=[Until_Condition] value=[None] 
   fld[24/33] len=512 name=[Until_Log_File] value=[] 
   fld[25/33] len=0 name=[Until_Log_Pos] value=[0] 
   fld[26/33] len=7 name=[Master_SSL_Allowed] value=[No] 
   fld[27/33] len=512 name=[Master_SSL_CA_File] value=[] 
   fld[28/33] len=512 name=[Master_SSL_CA_Path] value=[] 
   fld[29/33] len=512 name=[Master_SSL_Cert] value=[] 
   fld[30/33] len=512 name=[Master_SSL_Cipher] value=[] 
   fld[31/33] len=512 name=[Master_SSL_Key] value=[] 
   fld[32/33] len=0 name=[Seconds_Behind_Master] value=[]