Lost connection to MySQL server during query

Re: Lost connection to MySQL server during query

Postby vilian » Mon Sep 04, 2023 5:26 pm

Here, the majority are happening for "time out". The user just forget a module openned and after some time try to use it, so the message of "Lost Connection" is shown.

If the message hasn't been shown, I could identify the error, repeat the command and the program would stopped.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Lost connection to MySQL server during query

Postby nageswaragunupudi » Mon Sep 04, 2023 5:44 pm

What is the error number ?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Lost connection to MySQL server during query

Postby vilian » Mon Sep 04, 2023 6:32 pm

There is no error number. The complete message error is as bellow:

SELECT mps.cequipto,mps.demanda,mps.dedicada,mps.cmat,Count(*) AS qte FROM tmovgpes AS mps WHERE mps.data = '2023-01-11'AND mps.funcao IN('O','F') GROUP BY mps.cequipto;SHOW FULL COLUMNS FROM tmovgpes [ ERROR: Lost connection to MySQL server during query ]
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Lost connection to MySQL server during query

Postby nageswaragunupudi » Wed Sep 06, 2023 7:52 am

1) Normally an error log should look like this
Code: Select all  Expand view  RUN
FWLOG TO ::cLogFile cCallStack( "<-", 3 ), cSql, uRet, ::nError, ::cError, ::cSqlInfo

Error number is shown

2) Please check
Code: Select all  Expand view  RUN
? oCn:wait_timeout

By default should be 8 hours

Also, please let us know your MySql server version.
Code: Select all  Expand view  RUN
? oCn:cServerInfo
? oCn:nVersion
? oCn:OS


Now we are improving the internal reconnection logic and testing.
We will provide DATA bOnLostServer
If assigned with a codeblock, instead of displaying message, the codeblock will be evaluated. If the codeblock returns .T., the operation will be retried.

Will this be ok for you?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Lost connection to MySQL server during query

Postby vilian » Wed Sep 06, 2023 11:08 am

Good Morning,

? oCn:wait_timeout = 86400
? oCn:cServerInfo = 5.7.27-log
? oCn:nVersion = 5.72700000
? oCn:OS = Win64

Now we are improving the internal reconnection logic and testing.
We will provide DATA bOnLostServer
If assigned with a codeblock, instead of displaying message, the codeblock will be evaluated. If the codeblock returns .T., the operation will be retried.
Will this be ok for you?

It'll be perfect !!!
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Lost connection to MySQL server during query

Postby nageswaragunupudi » Wed Sep 06, 2023 12:43 pm

do any of these statement work for you?
Code: Select all  Expand view  RUN
? oCn:max_statement_time
//or
? oCn:max_execution_time
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Lost connection to MySQL server during query

Postby vilian » Wed Sep 06, 2023 1:10 pm

oCn:max_statement_time

Is generating the error bellow:
Called from: FWMARIA.PRG => FWMARIACONNECTION:MAX_STATEMENT_TIME( 10176 )

? oCn:max_execution_time = 0
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Lost connection to MySQL server during query

Postby vilian » Fri Sep 08, 2023 11:01 am

I've got a complete log of the moment when an error happened.

Code: Select all  Expand view  RUN
06/09/2023 16:42:08: FWMARIACONNECTION:EXECUTE_SQL( 6665 )  cCallStack( "<-", 3 ) = "FWMARIACONNECTION:QUERY( 7352 )<-TTARTES:EDITTASK( 6404 )<-(b)TTARTES_DEFINEDIALOGS( 433 )<-TBUTTONBMP:CLICK( 179 )<-TBUTTON:HANDLEEVENT( 1781 )<-TBUTTONBMP:HANDLEEVENT( 261 )<-_FWH( 3560 )<-SENDMESSAGE( 0 )<-TPANEL:COMMAND( 1149 )<-TWINDOW:HANDLEEVENT( 0 )<-TPANEL:HANDLEEVENT( 1827 )<-_FWH( 3560 )<-SYSREFRESH( 0 )<-STOPUNTIL( 71 )<-STV226( 54 )<-SYSEXECFUNCAOBIN( 208 )<-CHAMAPRG( 67 )<-(b)FAZMENUMOD( 433 )<-TMENU:ACTIVATE( 1621 )<-TRBTN:LBUTTONUP( 886 )<-TCONTROL:HANDLEEVENT( 1817 )<-TRBTN:HANDLEEVENT( 1578 )<-_FWH( 3560 )<-WINRUN( 0 )<-TMDIFRAME:ACTIVATE( 1097 )<-START( 178 )"  cSql = "SELECT * FROM ttartes LIMIT 1;SHOW FULL COLUMNS FROM ttartes"   uRet =  ::nError = 2013 ::cError = "Lost connection to MySQL server during query"   ::cSqlInfo = "" 
 
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Surasak and 17 guests