Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread Error 1107
Mon, Feb 10 2020 8:32 PMPermanent Link

jkr

Hi All-
Trying to determine if Error 1107 is from my applications, server setup,  network or Windows 2012 Server (Virtual Machine).  There’s a lot of information below, and perhaps knowing the purpose will allow skipping a lot of the details below. You might also jump to the end for the notes on the windows log and firewall.

The major bugs raise Access Errors on the server hosting the EDB Server.  If these continue, a runtime error 231 ultimately occurs.  Also an “index out of bounds” error will occur.

My applications are still not running correctly.  My own bugs are of course a significant problem, and that is being worked on but somehow often become the second priority.  Toward the goal of fixing them I’m introducing a text file error log to get precise source locations and to avoid writing to the database when it might be in an unstable state.  It seems to work well in testing.  I’ve also been testing MadExcept on a limited basis.

There is a long standing issue which may be contributing.  I view the EDB Configuration.LogEvents daily, but early on I started limiting what I looked at to filter out what I thought was non-essential.  Primarily error 1107.  Which in retrospect looks like a huge mistake.

All Sessions are using the same session name, both in EDB Manager and the Applications
All users are Administrators, with privileges assigned in the applications.

The LogEvents errors that are not 1107 are manageable.  Many, I think, require a table.refresh.  At any rate, most are within my ability to deal with.

Looking at Configuration.ServerSessions right now, 11:00 am, there are 57 rows, from 26 distinct IP addresses.
Many computers are running one or more applications simultaneously.
EDB Server 2.31 Build 10
Applications have only Session and Database components
All users and sessions are Remote

1107 errors;
Looking at a couple of full days: over 5000 LogEvents entries with Error 1107 per day
SessionDescription for all entries: Log Manager Session
Process always begins with the Server name

Server:
Standard NULL Behavior=1
Show Database Catalog Information=1
Cache Modules=0
Buffered File IO=0
Buffered File IO Settings=
Buffered File IO Flush Check Interval=60
Maximum Log File Size=16777216
Log Information Events=1
Log Warning Events=1
Log Error Events=1
Catalog Name=EDBDatabase
Configuration File Extension=.EDBCfg
Lock Files Extension=.EDBLck
Log File Extension=.EDBLog

Sessions:
Remote, Ansi
 Connection Timeout: 15 secs
 Pinging enabled
    Every 30 sec
    Timeout 180 secs
Pessimistic Transactions
Enable Row Change Detection disabled
Force Flushes checked
Keep Tables Open checked

Server Session Timeout=180
Server Dead Session Interval=30
Server Dead Session Expiration=300
Server Maximum Dead Sessions=64

I belatedly setup a local network in my work environment with a Windows 10 “Server” and 2 Windows 10 Clients with the same settings and don’t get any dropped sessions, although I’m not logged in throughout the day.  

I’m trying to get some help from the IT company that manages our network and servers.  I was hoping to resolve these issues through them before posting here, but no luck so far. I’m going to up the urgency level on this.  

A few further facts might clarify.
The 1107 errors can happen 2-3 times/second for  for some users.  Maybe all, but I haven’t verified this.
There are Logon and logoff events in the Windows Server 2012 all day.  These are also happening multiple times per second
There were some things in the Windows Logs that I can no longer find, but really caught my attention.  A firewall change on one particular day stopped the Logon/Logoff entries in the Windows log and the EDB log.  After another firewall change they were back.  Even though that seems to point to a network or windows issue, I’m not yet convinced.

Any help will be greatly appreciated.
Judd
Tue, Feb 11 2020 1:48 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

jkr


Since I retired I've stopped using c/s and am concentrating on single user systems now so I can't be of much help.

This bit <<The 1107 errors can happen 2-3 times/second for  for some users>> makes me suspicious of the network hardware.

I
Roy Lambert
Tue, Feb 11 2020 10:00 AMPermanent Link

Raul

Team Elevate Team Elevate

On 2/10/2020 8:32 PM, jkr wrote:

> Sessions:
> Remote, Ansi
>    Connection Timeout: 15 secs
>    Pinging enabled
>       Every 30 sec
>       Timeout 180 secs

Connection timeout of 15 sounds way too aggressive - if you have any
long queries it might trigger a connection timeout on client while
server would keep executing remote operation.

Any specific reason it's this short ?


> A few further facts might clarify.
> The 1107 errors can happen 2-3 times/second for  for some users.  Maybe all, but I haven’t verified this.
> There are Logon and logoff events in the Windows Server 2012 all day.  These are also happening multiple times per second
> There were some things in the Windows Logs that I can no longer find, but really caught my attention.  A firewall change on one particular day stopped the Logon/Logoff entries in the Windows log and the EDB log.  After another firewall change they were back.  Even though that seems to point to a network or windows issue, I’m not yet convinced.

1107 is basically "session no longer active" on server so generally it
means your client disconnects, server cleans the session and then client
tries to reconnect with that session and session is no longer around.

Assuming your app is not put to sleep i would track session
connect/disconnects on client and make sure you are thread safe (if
running edb connection on more than 1 thread)

Raul
Tue, Feb 11 2020 11:33 AMPermanent Link

jkr

Thanks, Raul.  I'm definitely confused over this

>> Connection timeout of 15 sounds way too aggressive - if you have any
>> long queries it might trigger a connection timeout on client while
>> server would keep executing remote operation.

TEDBSession.RemoteConnectionTimeout Property: Default is 15 sec according to manual.

These are the settings I have:
    Session tab in the Server options with a "Remote Timeout" of 180 sec
    Remote tab in the Session options viewed from the manager with a "Connection Timeout" of 15 sec

The RemoteConnectionTimeout in the Session component properties of my applications shows 15 sec.  I think this is the default.

This is head-scratching stuff for me.  I don't know if they're referring to the same thing.I'm attempting to follow the defaults.

Putting a Engine component on an empty form, I see the ServerSessionTimeout of 180, which would correspond to the actual setting in my Server.  (i don't use an engine component in the applications)

OK.  Somewhat more clear.
Engine.ServerSessionTimeout is 180
Session.RemoteConnectionTimeout is 15.  So, do you think this should be increased?

There is also descriptions of ServerSessionTimeout, Server DeadSesionInterval, and ServerDeadSessionExpiration with default values in the manual, but a note to change the ServerDeadsessionExpiration value to 10 if pinging.  Everyone is pinging, but I've left this at the default.  I don't mind changing this, but have held off.

Raul wrote:

On 2/10/2020 8:32 PM, jkr wrote:

> Sessions:
> Remote, Ansi
>    Connection Timeout: 15 secs
>    Pinging enabled
>       Every 30 sec
>       Timeout 180 secs



Any specific reason it's this short ?


> A few further facts might clarify.
> The 1107 errors can happen 2-3 times/second for  for some users.  Maybe all, but I haven’t verified this.
> There are Logon and logoff events in the Windows Server 2012 all day.  These are also happening multiple times per second
> There were some things in the Windows Logs that I can no longer find, but really caught my attention.  A firewall change on one particular day stopped the Logon/Logoff entries in the Windows log and the EDB log.  After another firewall change they were back.  Even though that seems to point to a network or windows issue, I’m not yet convinced.

1107 is basically "session no longer active" on server so generally it
means your client disconnects, server cleans the session and then client
tries to reconnect with that session and session is no longer around.

Assuming your app is not put to sleep i would track session
connect/disconnects on client and make sure you are thread safe (if
running edb connection on more than 1 thread)

Raul
Judd
Tue, Feb 11 2020 1:57 PMPermanent Link

Raul

Team Elevate Team Elevate

On 2/11/2020 11:33 AM, jkr wrote:
> TEDBSession.RemoteConnectionTimeout Property: Default is 15 sec according to manual.

Sorry my bad.

Remote timeout of the app session component is the one that matters
(i.e. how long does client wait for response from server in case of long
running query).

The remote Connection Timeout is just jsut how long to wait to establish
a connection so that should not matter in this case.

https://www.elevatesoft.com/manual?action=viewprop&id=edb2&product=rsdelphi&version=XE&comp=TEDBSession&prop=RemoteTimeout

vs

https://www.elevatesoft.com/manual?action=viewprop&id=edb2&product=rsdelphi&version=XE&comp=TEDBSession&prop=RemoteConnectionTimeout


> Putting a Engine component on an empty form, I see the ServerSessionTimeout of 180, which would correspond to the actual setting in my Server.  (i don't use an engine component in the applications)

The Engine Component in the app is does not represent engine component
in the server - i.e. you can use it to see defaults but it's the EDBSRVR
that controls what actually happens on server and you do not need engine
component in app (there is singleton created by EDB but you can ignore)


In terms of server settings they are pretty straightforward

- server session timeout is time in seconds that EDB server waits before
it disconnects client session due to inactivity. Enabling pinging is one
way to keep session alive since server sees ping from client even if
client itself is idle otherwise. Obviously if client uses the
connections for queries or data updates then again session timer is reset.

If for some reason your app does not send activity nor ping then you
should get the Sessions OnRemoteReconnect event can reconnect - if app
does then session goes active again

- Dead Session Expiration is next setting that tells EDB server how long
can session be in disconnected state. After this time expires
disconnected sessions is removed so now client has to do a new
connection from scratch since there is no existing sessions anymore

There is also the Dead Session Interval which determines how often
server polls for dead sessions - so in theory it take up to this time to
remove session even if session expiration is shorter.

There is also Maximum Dead Sessions which when reached EDB server will
start removing session immediately (instead of waiting for Dead Session
Interval).

Sorry for long text but looks like to me that you sessions reach their
server session timeout and then get removed by dead session expiration.

Anyways i would personally trace this from app side

Are you handling and logging following events in your app code to see
what gets fired :
- session OnRemoteTimeout (and set StayConnected to true)
- session OnRemoteReconnect
- i suggest also add handler for session OnProgress - i think it might
help with timeout for long operations (i.e. resets client side timeout)

You can also enable session RemoteTrace property and then use session
OnRemoteTrace event to log what is happening as it might help to track
this down

Raul
Wed, Feb 12 2020 2:12 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Raul


You know a LOT more about this than I do but what's your take on

<<The 1107 errors can happen 2-3 times/second for  for some users.>>

Roy Lambert
Wed, Feb 12 2020 8:39 AMPermanent Link

Raul

Team Elevate Team Elevate

On 2/12/2020 2:12 AM, Roy Lambert wrote:
> You know a LOT more about this than I do but what's your take on
>
> <<The 1107 errors can happen 2-3 times/second for  for some users.>>

To me this looks like :

- app gets it's session disconnected and removed by dbsrvr
- app repeatedly tries to reconnect on that session on client side
(instead of tearing it down and doing a new connection)

Remote sessions are bit tricky since one does not really know TCP
session is no longer active (general problem with TCP).

Only way to detect that is to send something and see if you get an error
(session ping etc are basically that - a remote noop that forces
transmit on connection).

However even with ping enabled code should assume any remote operation
could fail and then attempt to recover
- 1st try to reconnect
- if error still do new connection from scratch

Raul
Thu, Feb 13 2020 12:44 AMPermanent Link

jkr

Raul wrote:

Thanks for your post the other day.  It took a few reads.  The application session properties for RemoteConnectTime is 15, and for RemoteConnection is 180.  I'll leave those as is unless I hear otherwise or understand it better.

I hadn't previously setup any of the routines you mentioned, so I setup simple routines for all 4 events.
Progress: I set Continue to true, and my log entry catches the PercentDone.
RemoteTimeout: just logs the event.
RemoteReconnect: logs the event and sets Continue to true.  I ignored StopAsking, but realize that is a mistake, at least for now.
RemoteTrace: I just log the event.  I didn't find any examples to do anything else.

I got no hits on my local LAN Win 10 "server", but no surprise.  I'm the only user, and while the application I was t  testing was open it was dormant.

I installed one app with the procedures on our Windows 2012 network.  I'm just running it with no activity for now.  
With everyone gone, I was able to stop and restart the server.  Didn't get any results to speak of.  Nothing when the app was connected and just idling, and nothing when I stopped the server. I don't know if the newly installed MadExcept might effect results.  By Fri I hope to have some real activity with it.  And I'll probably test without MadExcept also.

I'm also taking more looks at the Events Log with 1107.  There's literally thousands a day.  Something like 5 thousand today.  Looking at the log with excel. I think the reconnects are not distributed evenly among active computers.  I'll have to modify the output log to really know.

I'll do some more testing and see what shows up.

Also, while I'm here, can anyone point me to how I delete a post?  I see I managed to post twice.

Thanks


-----------------
However even with ping enabled code should assume any remote operation
could fail and then attempt to recover
- 1st try to reconnect
- if error still do new connection from scratch

Raul
Judd
Thu, Feb 13 2020 5:28 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

jkr


<<Also, while I'm here, can anyone point me to how I delete a post?  I see I managed to post twice.>>

You can't.  I regard it as one of the strengths of Tim's system that you can neither edit nor delete a post. I know I'm weird.

Roy Lambert
Thu, Feb 13 2020 8:20 AMPermanent Link

Raul

Team Elevate Team Elevate

On 2/13/2020 5:28 AM, Roy Lambert wrote:
> You can't.  I regard it as one of the strengths of Tim's system that you can neither edit nor delete a post. I know I'm weird.
>

It's mostly developer forum so we have Immutable Posts Smile

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