Focal Point
forced time out of iWay connection ?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/9237052506

June 10, 2011, 06:30 AM
marnixR
forced time out of iWay connection ?
We're currently running into a server issue where it is possible to connect to the server using iWay Client, but subsequent queries using that connection hang indefinitely. This means that a lot of resources are taken up by open connections that don't go anywhere, and it would be handy if there was a way to shut them down. Is there a way of setting up the connection so that a query can be forced to time out after a set time ?




WebFocus 7.6.5 - Windows XP - admin of http://thescienceforum.org/ and Philosophorum
June 16, 2011, 02:08 PM
William Torres
search for a file on your server called -'edaprint.log', search for the string '(foc', this will show you foc errors ..... you could have a rouge focexec causing your server to hang. if your unable to figure this out, your could email me the edaprint.log file to wltorres@yahoo.com. Happy Computing to you!!


WebFOCUS 7.6
Windows, All Outputs
June 20, 2011, 12:04 PM
marnixR
I'm not sure if we're on the same wavelength here: the problem is not that we don't know why the server has become unavailable, it's that the unavailability of the server causes client connections to hang. It's the latter that we're trying to handle so that it doesn't cause a massive headache client-side.




WebFocus 7.6.5 - Windows XP - admin of http://thescienceforum.org/ and Philosophorum
February 02, 2012, 07:06 AM
marnixR
Sorry to bump this thread, but we still have the same problem as more than half a year ago.

The current status is as follows :

We have an ASP.NET web application that displays data accessed through the iWay adapter, using the iWay 76 Client ODBC Driver. Unfortunately if the data warehouse server is down when a call on it is made through the iWay adapter, then the call hangs indefinitely. Our technical Focus support team have investigated if there is a time-out setting on the iWay adapter, but say that there isn't one. Is there anything simple that can be done to either set a time-out, or kill the connection if it hangs?




WebFocus 7.6.5 - Windows XP - admin of http://thescienceforum.org/ and Philosophorum
February 02, 2012, 04:51 PM
ray_In_Vancouver
In your asp.net call to the Iway Adapter, are you using the ODBC datareader to reteive your data?


IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server
February 03, 2012, 09:35 AM
iWay Newbie
Hello marnixR,

since the problem is between the ODBC driver and the database, you should probably set the timeout in the database or in the ODBC driver.

There is KB entry for that:

ACC: How to Set the QueryTimeout Value for ODBC Connections

It's old but it's probably a good place to look for ideas. If you're using another vendor's ODBC driver, it might have similar settings.

Another thought is that you may be able to get another iWay DBMS adapter that connects directly instead of going through ODBC.

Good luck and let us know how things turn out!


--
WebFOCUS 8.2.03 on Linux
February 04, 2012, 10:13 PM
ray_In_Vancouver
Here is some .Net code that shows how to make sure the connection is closed. just change it to use the IWAY Adapter

 
Using (OleDbConnection connection = new OleDbConnection(
  "Provider=MSDataShape;Data Provider=SQLOLEDB;" +
  "Data Source=localhost;Integrated Security=SSPI;Initial Catalog=northwind"));
{
OleDbCommand custCMD = new OleDbCommand(
  "SHAPE {SELECT CustomerID, CompanyName FROM Customers} " +
  "APPEND ({SELECT CustomerID, OrderID FROM Orders} AS CustomerOrders " +
  "RELATE CustomerID TO CustomerID)", connection);
connection.Open();

OleDbDataReader custReader = custCMD.ExecuteReader();
OleDbDataReader orderReader;

while (custReader.Read())
{
  Console.WriteLine("Orders for " + custReader.GetString(1)); 
  // custReader.GetString(1) = CompanyName

  orderReader = (OleDbDataReader)custReader.GetValue(2);      
  // custReader.GetValue(2) = Orders chapter as DataReader

  while (orderReader.Read())
    Console.WriteLine("\t" + orderReader.GetInt32(1));        
    // orderReader.GetInt32(1) = OrderID
  orderReader.Close();
}
// Make sure to always close readers and connections.
custReader.Close();
}


If you start the connection in ASP.net then it can make sure it is closed.  

We ran into this doing the same call to the Iway adapter you are doing and the issue went away. 

 



IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server
February 09, 2012, 02:56 AM
marnixR
Sorry for the late reply. I'm acting as a conduit for colleagues who don't have access to this forum, and they're currently investigating the suggested options.
I hope to be able to give feedback soon.

Thanks for the assistance in the meantime.




WebFocus 7.6.5 - Windows XP - admin of http://thescienceforum.org/ and Philosophorum