Re: ODBC TIMEOUT PROBLEM
Posted in 1998
In article <35B8AEFE.1C55@bloomberg.net>, kagel@bloomberg.net (Art S. Kagel) wrote: > Gabriel Weisz wrote: > > > > We have a pager app. on NT which connect/disconnect every second > > to an > > Informix DB 7.24.on HP UNIX. Once or twice a day the connection > > hangs > > for 30 minutes (exactly 30 minutes) and then it comes back and > > continue. > > Does any one had any hanging problem with the CLI 2.5 & and > > Intersolv > > ODBC. Does anyone have any idea where that 30 minutes it might > > come > > from. > > Yup. That's the time it is taking for the HP/UX network driver to > realize that the port is no longer being used by the previous > connection and release it. This is configurable in either the kernel > or the driver itself. > > The real problem is that the NT app is just closing the port without > shutting it down properly. This is a common problem when PCs connect > to UNIX and do not properly shutdown the connection like when someone > powers down DOS. Make sure the code call the shutdown() function > equivalent with a flag value of '2', meaning to shutdown both sending > and receiving functionality, if the WinSock library supports an > equivalent function. > > Art S. Kagel > You'll get the same problem if the app crashes, the PC is turned off etc. As Art says Unix is behaving correctly. Use netstat -a and look for any connection that is in a FIN_WAIT(2) state, these are the problem. You might like to download a copy of lsof (you'll need to compile it from source probably). This allows you identify which PC is giving you the problem, which process is holding the port open among other things. Sometimes, but not often, you can kill the offending process. Of course, you could just re-start tcp :-)) Paul Watson # I don't suffer from WF Software Ltd. # stress, I'm just Tel. (+44) 1436 674729 # a carrier Fax. (+44) 1436 678693 #