ConnectionTimeOut
ConnectionTimeOut
I'm trying to set ConnectionTimeout to short value, 4 seconds for example, in direct mode, but timeout is always close to 26 seconds.. the same applies to pinging.
Any ideas?
Any ideas?
Odac 6.90.0.59 for Delphi 2010 for Win32
Another very strange, possibly related, behavior ...
If I set LoginPrompt to true (and add DbLogDlg) I get login window when I set my connection to true in Delphi environment. But when I run my application there is no login dialog.. so if I provide username and password I can connect, if not I get an error that there is no information...
Another very strange, possibly related, behavior ...
If I set LoginPrompt to true (and add DbLogDlg) I get login window when I set my connection to true in Delphi environment. But when I run my application there is no login dialog.. so if I provide username and password I can connect, if not I get an error that there is no information...
Hello
I tired to enter invalid host name, invalid IP, invalid port number, invalid SID, break connection, but always connection timeout was correct. Please give a detailed description of the case when connection timeout is 26 seconds and it cannot be changed. And please provide me the exact value of the TOraSession.Option.ConnectionTimeOut property.
Also you can open "Using UniDAC -> Writing GUI Applications with ODAC" section of the ODAC help and read the following information:
I tired to enter invalid host name, invalid IP, invalid port number, invalid SID, break connection, but always connection timeout was correct. Please give a detailed description of the case when connection timeout is 26 seconds and it cannot be changed. And please provide me the exact value of the TOraSession.Option.ConnectionTimeOut property.
Also you can open "Using UniDAC -> Writing GUI Applications with ODAC" section of the ODAC help and read the following information:
Since version 3.80 ODAC GUI part is standalone. This means that to make GUI elements such as SQL cursors, connect form, connect dialog etc. available, you should explicitly include OdacVcl (OdacClx under Linux) unit to your application.
I have a TOraSession on my DataModule. Server, Username and Password are set – I use default values except Direct is True and KeepDesignConnection is False. I have tried various values for „ConnectionTimeout“. On the DataModule:
DBIsl.Connected := False;
And when I try to connect, on user request:
Screen.Cursor := crHourGlass;
try
try
FGogn.DBIsl.Connected := True;
except
end;
finally
Screen.Cursor := crDefault;
end;
DBIsl.Connected := False;
And when I try to connect, on user request:
Screen.Cursor := crHourGlass;
try
try
FGogn.DBIsl.Connected := True;
except
end;
finally
Screen.Cursor := crDefault;
end;
Hello
I cannot reproduce your issue. Please try to reproduce your issue in a new empty application. Create a new application, add a new button and add the following code on the button click event:
And please provide me the result of executing this code. If in this code connection timeout is working correctly then please modify this code to reproduce your issue. Probably you are trying to connect several times repeatedly and it is the cause of this issue.
I cannot reproduce your issue. Please try to reproduce your issue in a new empty application. Create a new application, add a new button and add the following code on the button click event:
Code: Select all
var
MySession: TOraSession;
start_time, finish_time: TDateTime;
begin
MySession := TOraSession.Create(self);
MySession.Options.Direct := True;
MySession.Options.ConnectionTimeout := 1000;
MySession.Username := ...;
MySession.Password := ...;
MySession.Server := ...;
Screen.Cursor := crHourGlass;
start_time := Now;
try
try
MySession.Connected := True;
except
end;
finally
finish_time := Now;
Screen.Cursor := crDefault;
MySession.Destroy;
ShowMessage('Connection timeout is: ' + FloatToStr((finish_time - start_time) * 24 * 60 * 60) + ' sec.');
end;
end;Hi, no I'm not trying to connect several times.
It takes 21 seconds for timeout to appear, I tried a few times, 21.0... was the displayed result.
Connection took 0.2 .. 0.3 seconds when server was available.
However, I believe I have found the root of the problem.
I am connecting directly to an IP address, when I use the server name, the connection timeout is close enough, the display in your test is 2.2 seconds.
It takes 21 seconds for timeout to appear, I tried a few times, 21.0... was the displayed result.
Connection took 0.2 .. 0.3 seconds when server was available.
However, I believe I have found the root of the problem.
I am connecting directly to an IP address, when I use the server name, the connection timeout is close enough, the display in your test is 2.2 seconds.
Hello
It is good to see that this problem has been solved.
I reproduced this issue for the case when server is defined as direct IP address. But it is not the only condition. Second condition is FireWall that is turned on, it blocks socket and doesn't allow closing it when connection time is out. If I turn off FireWall then connection timeout works correctly.
We will try to fix it but it can take a lot of time and we cannot guarantee success.
It is good to see that this problem has been solved.
I reproduced this issue for the case when server is defined as direct IP address. But it is not the only condition. Second condition is FireWall that is turned on, it blocks socket and doesn't allow closing it when connection time is out. If I turn off FireWall then connection timeout works correctly.
We will try to fix it but it can take a lot of time and we cannot guarantee success.