Mapp Database with python connector always connect lost

Hello,
We are testing mapp Database on Hypervisor.
AR using Query to send data cyclically via shared Ethernet to Windows.
We always meet connect error:


and the logger shows:

Help shows some tips but they all point to when they cant connect at the beginning,
On our satuation we can connect successful at first and maybe the second day it will happen disconnect and sometimes restart the AR and reconnect it, then the lost will comes another somehow. (In other words it happened one day a time, reconnect will solved it but will happen again)

Why this will happen, we use the internal ethernet, Logically speaking it is quite stable, and no other communication and no software installed on windows side.

Do you connect once and never disconnect? could it be that there is timeout/automatic disconnect set somewhere? I would (for test) introduce logic to disconnect time to time from SQL server.

Thanks for your tips, I checked the timeout it seems all default:
wait_timeout = 28800; (8hours)
max_execution_time = 0; (I think it means no timeout)
interactive_timeout = 28800; (8hours)
innodb_lock_wait_timeout = 50;

There is also no other logic I have checked…
Here is the AR side, DataInsert is force to 1 and the query is looping execution:

	case 100:		//Wait Query Command
		if(gQueryDataTemp.QueryCmd.TableCreate)
		{
			gQueryDataTemp.QueryAgentDB.Name 	= &DATATEMP_TABLE_CREATE;
			gQueryDataTemp.QueryAgentDB.Execute = 1;
			gQueryDataTemp.QueryStep = 200;
		}
		else if(gQueryDataTemp.QueryCmd.TableDrop)
		{
			gQueryDataTemp.QueryAgentDB.Name 	= &DATATEMP_TABLE_DROP;
			gQueryDataTemp.QueryAgentDB.Execute = 1;
			gQueryDataTemp.QueryStep = 200;
		}
		else if(gQueryDataTemp.QueryCmd.DataInsert)
		{
			gQueryDataTemp.QueryAgentDB.Name 	= &DATATEMP_INSERT;
			gQueryDataTemp.QueryAgentDB.Execute = 1;
			gQueryDataTemp.QueryStep = 200;
		}
		else if(gQueryDataTemp.QueryCmd.DataSelectDTCurve)
		{
			gQueryDataTemp.QueryAgentDB.Name 	= &DATATEMP_SELECT_DT;
			gQueryDataTemp.QueryStep = 500;
		}
		else if(gQueryDataTemp.QueryCmd.DataSelectDTReport)
		{
			gQueryDataTemp.QueryAgentDB.Name 	= &DATATEMP_SELECT_DT;
			gQueryDataTemp.QueryStep = 500;
		}
		else if(gQueryDataTemp.QueryCmd.DataSelectBatchReport)
		{
			gQueryDataTemp.QueryAgentDB.Name 	= &DATATEMP_SELECT_CODE;
			gQueryDataTemp.QueryStep = 500;
		}
		else if(gQueryDataTemp.QueryCmd.DataInsertAuto)
		{
			gQueryDataTemp.QueryStep = 700;
		}
		
		if(gQueryDataTemp.QueryAgentDB.Error)
		{
			gQueryDataTemp.QueryStep = 990;
		}
		break;
	case 200:		//Execute Query Command
		if(gQueryDataTemp.QueryAgentDB.CommandDone)
		{
			gQueryDataTemp.QueryAgentDB.Execute = 0;
			gQueryDataTemp.QueryTimer.IN = 0;
			gQueryDataTemp.QueryStep = 220;
		}
		else if(gQueryDataTemp.QueryAgentDB.CommandBusy)
		{
			gQueryDataTemp.QueryTimer.IN = 1;
			gQueryDataTemp.QueryTimer.PT = 1000;
			if(gQueryDataTemp.QueryTimer.Q)
			{
				//TODO: Execute Timeout Handle
				gQueryDataTemp.QueryAgentDB.Execute = 0;
				gQueryDataTemp.QueryTimer.IN = 0;
				gQueryDataTemp.QueryStep = 900;
			}
		}
		else if(gQueryDataTemp.QueryAgentDB.Error)
		{
			//TODO: Execute Error Handle
			gQueryDataTemp.QueryTimer.IN = 0;
			gQueryDataTemp.QueryStep = 920;
		}
		break;
	case 220:		//Query Execute Success
		if(gQueryDataTemp.QueryCmd.TableCreate)
		{
			gQueryDataTemp.QueryCmd.TableCreate = 0;
		}
		else if(gQueryDataTemp.QueryCmd.TableDrop)
		{
			gQueryDataTemp.QueryCmd.TableDrop = 0;
		}
		else if(gQueryDataTemp.QueryCmd.DataInsert)
		{
			gQueryDataTemp.QueryCmd.DataInsert = 0;
		}
		gQueryDataTemp.QueryStep = 100;
		break;

Hi @shenyang.zhou,

I’m not a expert in mappDatabase or Python, but looking into your screenshots it seems a bit like that:

  • it works as long as the Windows system / python response is done within a second
  • if the response takes a bit longer, it breaks

Of course it could just be a coincidence by only looking into the screenshot: but in both cases the error happened, the timestamp on console differed one second, while otherwise there was no difference.

I also don’t think that a interruption of the internal hypervisor ethernet connection is the cause. But maybe the script and the connection to the database connector are single-threated processes, and if (for whatever reason) the last request wasn’t finished by the thread until the next request is arriving, this could lead to a windows-sided internal break of the socket?
As I said I’m not sure about, but I would propose to make a simple test by using a send interval of more then 1 second (maybe 5-10 seconds for example) to see if the behavior changes.

Best regards!