Connection Timeout
Posted: Tue 13 May 2014 06:28
Dear devart team,
is there any possibility to set a duration for the ibcconnection timeout.
The following log entry shows that the connection timeout on Task 17523 seems to be about 180 seconds.
We do several jobs in different threads, each thread has its own connection, transaction and query. Usually the database procedure runs about 1000 ms and so a timeout of 3 minutes is to much.
On the following code you see i tried to use the parameter 'connect_timeout=X', but it doesn't seems to be implemented.
We would be glad to hear from you.
Best Regards,
Jan
BFS Health finance
is there any possibility to set a duration for the ibcconnection timeout.
The following log entry shows that the connection timeout on Task 17523 seems to be about 180 seconds.
20:21:29 Task 17592 [ 200783|TASKNAME ]: [778ms] abgeschlossen unauffällig
20:23:31 Task 17523 [ 200714| TASKNAME ]:
Unable to complete network request to host "DB-DEV".
Failed to establish a connection. FEHLER
We do several jobs in different threads, each thread has its own connection, transaction and query. Usually the database procedure runs about 1000 ms and so a timeout of 3 minutes is to much.
On the following code you see i tried to use the parameter 'connect_timeout=X', but it doesn't seems to be implemented.
Code: Select all
try
fCon := TIBCConnection.Create(nil);
QryDo := TIBCQuery.Create(nil);
fTran := TIBCTransaction.Create(nil);
// try
// Verbindungsparameter festlegen
fCon.Database := DATABASE;
fcon.Username := DBUSER;
fCon.Password := DBPASS;
QryDo.Connection := fCon;
QryDo.Transaction := fTran;
QryDo.Transaction.DefaultConnection := QryDo.Connection;
QryDo.Transaction.IsolationLevel := iblcustom;
QryDo.SQL.Text:= ' select result from DO_SOMETHING ';
// fcon.Params.Add('connect_timeout=5');
// Sleep(10000);
fcon.Connect;
QryDo.Transaction.StartTransaction;
QryDo.Open;
result := QryDo.FieldByName('Result').AsBoolean;
QryDo.Transaction.Commit;
QryDo.Close;
fcon.Disconnect;
finally
if QryDo.Transaction.Active then
QryDo.Transaction.Rollback;
if Assigned(fTran) then
FreeAndNil(ftran);
if Assigned(QryDo) then
FreeAndNil(QryDo);
if Assigned(fCon) then
FreeAndNil(fCon);
end;
Best Regards,
Jan
BFS Health finance