Page 1 of 1

Intermintant connection issue

Posted: Mon 13 Mar 2017 18:12
by evaughen
SYSTEM: PHP 7, UnixODBC, Ubuntu 16.04 virtualized on VM using Vsphere 6

When attempting a connection after a significant amount of idle time between requests, I get the following error:

odbc_connect(): SQL error: [unixODBC][Devart][ODBC][Microsoft SQL Server]Error on data reading from the connection: Connection reset by peer. Socket Error Code: 104($68), SQL state 08001[unixODBC][Devart][ODBC][Microsoft SQL Server]Error on data reading from the connection: Connection reset by peer. Socket Error Code: 104($68) in SQLConnect

Anyone know who to fix this intermittent error? It seems to be directly related to how long between SQL requests... frequent requests are handled well... requests after a long delay... say minutes... usually result in the error.

This behavior is NOT seem on my non-virtualized dev system running Ubuntu 12.04 & PHP 5

Re: Intermintant connection issue

Posted: Mon 13 Mar 2017 18:16
by evaughen
When using isql:

[0800][unixODBC][Devart][ODBC][Microsfot SQL Server] Error on data reading from the connection:
Try Again.

The second time I try it works fine.

Re: Intermintant connection issue

Posted: Tue 14 Mar 2017 17:47
by evaughen
Its seems that either Ubuntu or vSphere is causing a HUGE latency issue on the LAN after a minute or so of idle time. To fix this, I created a CRON job on my Ubuntu server that starts when the server is booted. This job basically pings an IP address every 30 second to keeps the connection alive....

/bin/ping -i 30 xxx.xxx.xxx.xxx

where xxx.xxx.xxx.xxx is some device that responds to a ping.

Re: Intermintant connection issue

Posted: Fri 26 May 2017 15:32
by MaximG
Do you manage to establish a test connection when using our driver in your system? Or is the problem related to a large length of delay when working in the virtual environment?