0

My issue is that I need to set the connection timeout to longer than the default. It ignores the fact that I set the timeout to longer.

This part creates the odbcConnection object:

var odbcConnection = new OdbcConnection(district.DBConnectionString);
odbcConnection.ConnectionTimeout = 60;
                        
return odbcConnection;

Which is then returned to here:

using(IDbConnection db = SisFlavorDBFactory.GetDownloadConnection(District, Context))

I implemented this a year ago and at that time it did extend the connection timeout. But it is no longer doing that. I'm not aware of anything changing.

The connection string is:

DRIVER={Progress OpenEdge 11.1 Driver};UID=;PWD=;HOST=;PORT=;DB=;

I tried adding the connect timeout attribute to it but it seems that doesn't work with OpenEdge. I'm open to any suggestions.

SSD
  • 1,041
  • 3
  • 19
  • 39
  • How long does it take before you are getting the timeout error? The default is 15 seconds and should take only a couple of seconds. If you are getting an error it is not the timeout. Either your database is not accessible or you do not have a route to the database. – jdweng Aug 12 '20 at 01:07
  • It takes the 15 seconds to timeout. I can manually connect to the database with the given information in the connection string. The reason for needing to do this is a little weird. This particular client, when I try to connect manually it will timeout on the first try after about 60 seconds, but when I immediately try to connect again, it will connect in under 10 seconds. SO, if I try and fail to connect manually the first time, then my process will succeed in connecting. I was extending the timeout to let the process timeout the first time on it's own and then connect on its second try. – SuperVillainPresident Aug 12 '20 at 15:35
  • I think you are having a proxy issue. Often the the connection will fail when looking for a proxy (a timeout occurs) and then the connection will work. See if this helps : https://social.msdn.microsoft.com/Forums/en-US/179d56cd-c502-4b93-bb4b-34b586f6f901/connecting-to-progress-database-from-net?forum=adodotnetdataproviders – jdweng Aug 12 '20 at 15:46
  • Thank you for the suggestion. I don't have access to the openedge software. I only have the driver so I can create the connection. I tried a DSN and that didn't work either. I have a similar connection with other clients that don't give me this problem. Is there something the IT people at my client's side can do to fix the proxy issue on their end? – SuperVillainPresident Aug 13 '20 at 17:01
  • I think there is a OpenSSL library that may need updating. See : https://www.progress.com/odbc/release-history/openedge-odbc – jdweng Aug 13 '20 at 22:16
  • Also see last answer of following page. Your symptoms are identical to many posting and you may need to talk with vendor. There seems to be an issue in Net library of using a proxy before using a certificate. So there is a long delay waiting for the proxy to timeout before ignoring proxy. See : https://stackoverflow.com/questions/36506539/how-do-i-get-visual-studio-code-to-trust-our-self-signed-proxy-certificate – jdweng Aug 13 '20 at 23:17

0 Answers0