Strange timeouts with SB901

forum.sqlbase (2000-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 09 Feb 2009, 17:07

 Posted by:  Marco Westermann 

Hi,

we have an application written in TeamDeveloper 2005.1. The users uses
this application and everything works fine. But when someone uses the
application in a Terminal-Server, all other users suddenly gets
timeouts. This strange behaviour we found at two of our customers, which
use the application. it is always an Win2003 Server. At the first time,
this happened, we could reinstall the server and everything works. Now
the second time, a reinstallation didn't help. It is a Terminal-Server
and the user gets the acounts over an Domain-Controller. The Database
lies on a different server. But reinstalling the Database-Server or
using another one didn't help either. The application uses RL as
Transaction level. Does anybody have an idea, what this could be???
Tomorrow I have to visit the customer to find the error!

Best regards,

Marco Westermann

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 09 Feb 2009, 17:22

 Posted by:  Rainer Ebert 

Hi Marco

I don't know from such a problem. Our big application (TD4.2, formerly
TD4.1 - against SB9.0.1PTF2) does not have such problems running in Terminal
Server environments. But some things I would check:

a) At the moment the timeout occurs, use SQLConsole to get the process and
SQL-Statement which helds the exclusive lock. To do so, you have to connect
to the server AND to the database within SQLConsole.

b) Have a look at the dlls. Make sure, that only the correct SQLBase dlls
are installed. We have in separate directories an installation of the
SQLBase client and of the TD runtime module. In the TD runtime directory, I
move all SQLBase dlls to a subdirectory "removed". Mainly this are
country.sql, error.sql, gtputilcom.dll, message.sql, sqlapiw.dll,
sqlbapw.dll, sqlwntm.dll and sqlws32.dll. Both directories have to be in the
path (or copy the neccessary files to a single directory).

Regards,
Rainer

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 06:23

 Posted by:  F R Bhote 

Run an audit and see what exactly is causing the timeouts:

SET SERVER SERVER1;
START AUDIT AuditFileName OVERWRITE CATEGORY 8;

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 12:00

 Posted by:  Marco Westermann 

Thanks for your advises. Now I'm at our customer, which has the problems.

When I connect to SqlConsole and have a look at the cursors I can figure
out the follwing:

1. When starting the application from a client, every cursor in
SqlConsole has the Isolation Level: RL, but when starting the
application from the Terminal-Server suddenly the application selects
with RR (only the cursor from the TS-Application).
That is why all other clients becomes 1805 (Timeouts) and after that
they become 201, 203 errors (which could be an aftereffect.

2. I checked the dlls and made sure, only the correct dlls from
SqlBase901 are used.

3. The problem occured suddenly. The work on the Terminal Server for
years, and from one day to the other, the errors occur.

So any further ideas?

Thanks Marco

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 12:34

 Posted by:  Rainer Ebert 

Marco,

can you eliminate, that the isolation level is set to RR by the application
(e.g. by having this configured in an ini-file and the application defaults
to RR if nothing is in the ini file or the ini file could not be read?)

Do you perhaps have a special implementation that does a reconnect if the
connection is broken and is there missing the setting of the isolation
level?

How do you set the isolation level? By SqlSetIsolationLevel( hSql, 'RL') or
by Set SqlIsolationLevel = 'RL'? Perhaps this makes a difference?

How do you connect to SQLBase? Native, ODBC, OLEDB, JDBC, .Net Data
Provicer? If not native, perhaps there is a problem/bug in the appropriate
driver?

Do you use distributed transactions? Perhaps this leads to additional
problems?

Sorry that I cannot help you more.

Regards,
Rainer

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 12:53

 Posted by:  Marco Westermann 

The IsolationLevel is set in the "On SAM_AppStartup"-Action with:
Call SqlSetIsolationLevel ( gvhSql, "RL" )

When Connect fails or connection is closes, there is no reconnect. The
application exits.

Now I found out, that when starting the application on the
terminal-Server as Administrator, everything works fine.. But when
starting the application as User on TerminalServer, the cursor is set to
RR. Furthermore, the client has a different name in SQLConsole although
it is the same pc. So the sql.ini has to be different depends on wich
user connects.. I check that at the moment.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 13:15

 Posted by:  Rainer Ebert 

Hi Marco,

seems that you are on the right way. Can you please tell the result after
you have find out what is happening and how to correct it.

Regards,
Rainer

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 13:25

 Posted by:  Rainer Ebert 

Marco,

I don't know if you know, that the client name can be set from the
application by calling "SqlSetParameterAll( hSql, SQLPCLN, 0, sClientName,
FALSE )". So the reason for a different client name can be the sql.ini but
can also have other reasons.

Regards,
Rainer

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 13:53

 Posted by:  F R Bhote 

I can't understand why you don't want to do an audit - it takes only a few
seconds to do and you get the exact reason as soon as you get a timeout. For
example:

008,20-DEC-07 11:12:38.84,LOCK HOLDER,DBNAME,USER,CLIENT,RL,60,1,256,X-Lock,
CREATE INDEX XDBX ON Z (P_CODE)
008,20-DEC-07 11:12:38.84,TIMEOUT,DBNAME,USER,CLIENT,RL,10,1,256,S-Lock,
SELECT M_VERSION FROM SYSADM.MISC

You get the exact statement, user, lock mode, type of lock, etc casuing the
timeout. No guessing required at all...

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 14:09

 Posted by:  Marco Westermann 

Hi,

here is the result of the audit.. I didn't do one because I already
know, why the timeouts occur (because one cursor have RR as Isolation
level - I can see that in SqlConsole)
but maybe you can see something I don't see.

000,10-FEB-09 13:55:44.29,GLOBAL,QSTEP,8
008,10-FEB-09 13:57:29.21,LOCK
HOLDER,QSTEP,SYSADM,MHPC01,RL,10,322772,887,X-Lock,
INSERT INTO VKBELEG ( DEV_NKEY, PRG_NKEY, VKB_DANGEBOTBIS, VKB_DBELEG,
VKB_DDRUCK,
VKB_DDRUCKZEIT, VKB_DFREMDBELEG, VKB_DLIEFERTERMIN, VKB_DSPERRE,
VKB_DSTORNO,
:201 , :202 , :203 , :204 , :205 ,
:206 , :207 , :208 , SYSDATETIME )
999,10-FEB-09 13:57:57.81,QSTEP

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 16:34

 Posted by:  Marco Westermann 

OK i got the error: it was a combination of wrong dlls, which came over
the Domain-Controller and more than one sql.ini (which also came over
Domain-Controller). So whereever you have the problem:

1. check wether there are more than one set of communication dlls and
2. check wether there are more than one sql.ini file.

Check also what the domain-Controller gives to the user when he logs in.

best regards,

Marco Westermann

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Strange timeouts with SB901

Post by NewsgroupServer » 10 Feb 2009, 16:40

 Posted by:  Rainer Ebert 

Hi Marco,

thanks for clarifying this.

Regards,
Rainer

Return to “forum.sqlbase”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests