Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 30 total
Thread C/S problems
Tue, Sep 16 2008 8:36 AMPermanent Link

Heiko Knuettel
Hi,

I switched to C/S yesterday and I'm experiencing a bunch of very nasty problems since then :

1) Sometimes the application hangs when doing database.open (but session.connect works).
After a while I'm sometimes getting a "stream timeout" error, sometimes not. Sometimes
this seem to affect every user (one user has the db.open problem - every other user has it
too, even users that don't use the server but a local session), sometimes only a few users
have, but others are working without problems at the same time.

If you kill the application and restart it several times, eventually database.Open works.
If you try to remove dead sessions manually from edbsrvr when this happens, edbsrvr
freezes, but recovers a while (DeadSessionInterval ?) later. When it's recovered,
database.Open works again for everyone - for a while.
I'm a bit lost...I can't find a pattern, I can't reproduce it, since when working as a
single user on my test server, everything works.

2) I'm experiencing random connection losses ((Error #1101 The connection to the server at
'192.168.0.1' has been lost ('The reconnection was cancelled')). Maybe this one is linked
with the first problem.

3) I'm getting Access Violations from edbsrvr.exe during query executions inside a
full-db-transaction (EDBDatabase.StartTransaction). Again, very random...do an operation,
get an AV - restart the application, rerun the same operation - no AV. I've rewritten all
transactions now to affect only specific tables, and this problem seems gone for the moment.

4) "Error #100 : There is an error in the metadata for <table>" I've been getting them on
a daily basis. Until now I thought this was because I used filesharing mode with too much
(about 15) users - operations were slow, users thought the application was frozen, and
killed it during write operations. But now I experienced the same with every user in C/S
mode - I got this error even for a memory table yesterday.

Some additional info : I'm not using external modules, jobs, stores, replication,
procedures, views, encryption . I make heavy use of memory tables, cross-db-queries and
SQL/PSM-functions.

My remote session settings are :

RemoteCompression   := 0;
RemotePing          := true;
RemotePingInterval  := 10; //lowered because of disconnects, but no effect
RemoteTimeout       := 60; //lowered because of db.open problem, but no effect
RemoteTrace         := false;
ForceBufferFlush      := false;
KeepConnections       := true;
KeepTablesOpen        := false;
RecordChangeDetection := false;
RecordLockProtocol    := lpPessimistic;
RecordLockRetryCount  := 15;
RecordLockWaitTime    := 100;

The problems seem to get worse when I set KeepTablesOpen to true. If I change the
RecordLockProtocol to optimistic, I'm getting locking errors - but only in the memory
database (???).

The local session uses the default settings, and besides of the Error #100 problem
everythings works fine.

Help please... Frown

Heiko
Tue, Sep 16 2008 9:20 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Heiko


Since you were also getting problems in file sharing mode I'd suspect hardware (especially network cards), anti-virus software, or possibly different versions of Windows (eg XP and Vista) on workstations and the server.

Were you a DBISAM user, and if so did you get any similar problems then? If so it must be your environment, if not I'd still suspect that because otherwise there would be a LOT of complaints Smiley

Roy Lambert [Team Elevate]
Tue, Sep 16 2008 10:04 AMPermanent Link

Heiko Knuettel
Roy,

>>Were you a DBISAM user, and if so did you get any similar problems then?

Yes and No. The same application in the same environment ran for 3 years in DBISAM C/S
mode. It's only migrated to EDB, almost no additional things implemented but the needed
workarounds to get the same functionality.

Clients are mixed Win2K/WinXP, Server is Win2K3. Power source is 100% stable, not only the
server, but every client and the network switch have their own UPS. AVG Antivirus is in
use, but the application and db folder are excluded from scanning.

Heiko
Tue, Sep 16 2008 10:29 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Heiko

>>>Were you a DBISAM user, and if so did you get any similar problems then?
>
>Yes and No. The same application in the same environment ran for 3 years in DBISAM C/S
>mode. It's only migrated to EDB, almost no additional things implemented but the needed
>workarounds to get the same functionality.
>
>Clients are mixed Win2K/WinXP, Server is Win2K3. Power source is 100% stable, not only the
>server, but every client and the network switch have their own UPS. AVG Antivirus is in
>use, but the application and db folder are excluded from scanning.

To my simplistic mind that should pretty much rule out the environment which leaves your code and Tim's code. Usually when its come down to that sort of choice its been my code at fault but we'll just have to wait for the guru to comment.

I assume that edbsrvr is just the standard one without any customisations and do you have the server logs - do they indicate anything?

Roy Lambert [Team Elevate]
Tue, Sep 16 2008 11:06 AMPermanent Link

Heiko Knuettel
Roy

>>do you have the server logs - do they indicate anything?

Ahm...OK. I just found the logs, and looked the first time into it. Nice feature Wink

It seems that the Error #100s are initiated by a "Rollback Transaction". At least every
time this error occurred, the first occurence was a "Rollback Transaction". But the log
seems incomplete (?) ...I swear I had this error yesterday and on friday, but thursday is
the last error logged. Strange...

Also there is nothing mentioned about the login problem.

And while writing this and looking into the logs with EDB Manager remote session, I had
the disconnect again, this time not within my application. 2 times the question "The
connection to the ElevateDB Server has been interrupted or timed out and needs to be
re-connected.  Would you like to continue with the connection ?" and after that "ElevateDB
Error #1107 The session ID 7 is no longer present on the server.

Heiko
Tue, Sep 16 2008 11:40 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Heiko


I'm out of my depth now and I'm going to have to say it needs someone who actively uses c/s to jump in.

Roy Lambert
Tue, Sep 16 2008 9:19 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Heiko,

<< 4) "Error #100 : There is an error in the metadata for <table>" I've been
getting them on a daily basis. Until now I thought this was because I used
filesharing mode with too much (about 15) users - operations were slow,
users thought the application was frozen, and killed it during write
operations. But now I experienced the same with every user in C/S mode - I
got this error even for a memory table yesterday. >>

Are you executing any DDL statements at all when this happens ?  If so, are
any DDL statements being executed in the context of a transaction ?  EDB
shouldn't allow this, but if it is doing so by accident, then that would
cause this type of issue during a rollback.

<< My remote session settings are : >>

Your ping setting are way too low, as is the timeout setting.  You should
definitely revert those to the defaults, especially if you aren't using
OnRemoteTimeout and OnRemoteReconnect event handlers for the remote session.
What is your dead session expiration setting on the EDB Server ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Sep 16 2008 9:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Heiko,

<< It seems that the Error #100s are initiated by a "Rollback Transaction".
At least every time this error occurred, the first occurence was a "Rollback
Transaction". But the log seems incomplete (?) ...I swear I had this error
yesterday and on friday, but thursday is the last error logged. Strange...
>>

I can't see how this is possible as long as the EDB Server was able to trap
the exception - it writes the events to the log immediately upon the
exception occurring.

<< Also there is nothing mentioned about the login problem. >>

Which problem are you referring to here ?

<< And while writing this and looking into the logs with EDB Manager remote
session, I had the disconnect again, this time not within my application. 2
times the question "The connection to the ElevateDB Server has been
interrupted or timed out and needs to be re-connected.  Would you like to
continue with the connection ?" and after that "ElevateDB
Error #1107 The session ID 7 is no longer present on the server. >>

This is evidence of a too-low session timeout setting for the remote session
or the ElevateDB Server, or an issue with the network that is causing the
connection to be dropped on the ElevateDB Server.

The first thing you should do is to put all of the settings that you changed
back to the defaults.  Changing settings in situations like this just ends
up confusing the issue further.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Sep 17 2008 5:26 AMPermanent Link

Heiko Knuettel
Tim,

>>Error #100...Are you executing any DDL statements at all when this happens ?

I have to check.

>>Connection losses...This is evidence of a too-low session timeout setting for the remote
session or the ElevateDB Server

You are probably right. I lowered DeadSession/TimeOut/Ping etc. settings because it seemed
to have a positive effect on the "login problem". I changed everything back to defaults
now, and will see what happens.

>>"login problem"...Which problem are you referring to here ?

Just happened again:

8 Users logged in (my application), working normally.
9th user tries to log in. Application hangs at database.Open. Killing task and trying
again doesn't help. Trying from another machine doesn't help. Even using a local session
doesn't help, Application freezes every time at database.Open
edbsrvr.exe shows the users that tried to login, but without a (disconnected)
If you try to remove them manually, edbsrvr "freezes"...the UI does not get updated
anymore, Task Manager says its frozen, but CPU consumption is 0%
After that, the login now fails for C/S sessions at session.Connect , and for local
sessions at database.Open
Some minutes later edbsrvr.exe recovers, dead sessions are removed, but still every
application start hangs at database.Open
This remains so, until every user closes the application and/or I restart the server.
After that, everything works again...for an hour or so, until the next user encounters the
problem.

And during this whole process, all users who logged in BEFORE this problem occurred, can
work without problems. Only if they close the application and restart it, they can't
login, like the others.

>>I can't see how this is possible as long as the EDB Server was able to trap
>>the exception - it writes the events to the log immediately upon the
>>exception occurring.

Question about the "log" :
I've been looking into Configuration.LogEvents yesterday. Is there a different "log file"
for the server (and if so, where can I find it), or does the server log its Events into
Configuration.LogEvents the same way as a local session does ?

While resetting server settings, I saw that in edbsrvr.exe the three log checkboxes are
unchecked. This seems to be so by default (checked by deleting the .ini). Could this be
the reason for the server not writing the logs ?

Heiko
Wed, Sep 17 2008 5:50 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Heiko,

<< Just happened again:

8 Users logged in (my application), working normally.
9th user tries to log in. Application hangs at database.Open. Killing task
and trying again doesn't help. Trying from another machine doesn't help.
Even using a local session doesn't help, Application freezes every time at
database.Open edbsrvr.exe shows the users that tried to login, but without a
(disconnected) >>

Have you tried to just instantiate 9 instances of the EDB Manager or your
application using the same server ?  I know it works here because I just
tried it with 10 client apps and it works just fine, but perhaps it will be
reproducible with your setup.

<< If you try to remove them manually, edbsrvr "freezes"...the UI does not
get updated anymore, Task Manager says its frozen, but CPU consumption is 0%
After that, the login now fails for C/S sessions at session.Connect , and
for local sessions at database.Open Some minutes later edbsrvr.exe recovers,
dead sessions are removed, but still every
application start hangs at database.Open This remains so, until every user
closes the application and/or I restart the server. After that, everything
works again...for an hour or so, until the next user encounters the problem.

And during this whole process, all users who logged in BEFORE this problem
occurred, can work without problems. Only if they close the application and
restart it, they can't login, like the others. >>

It sounds like the EDB Server's critical section for connects/disconnects is
getting acquired and not released for some reason.  What that reason is, I
don't know at this point, because an examination of the code shows that all
acquisitions of the critical section are done properly using a try..finally
block that always ensures that the section is released.  I'll run our
connection stress test on the server and see what I can find.

<< Question about the "log" :
I've been looking into Configuration.LogEvents yesterday. Is there a
different "log file" for the server (and if so, where can I find it), or
does the server log its Events into Configuration.LogEvents the same way as
a local session does ? >>

As long as both the local session and the server are using the same
configuration path, then yes.

<< While resetting server settings, I saw that in edbsrvr.exe the three log
checkboxes are unchecked. This seems to be so by default (checked by
deleting the .ini). Could this be the reason for the server not writing the
logs ?  >>

Yep, that will do it.

--
Tim Young
Elevate Software
www.elevatesoft.com

Page 1 of 3Next Page »
Jump to Page:  1 2 3
Image