Consultor Eletrônico



Kbase P23981: Many connections to an AppServer, even with few users.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

SYMPTOM(s):

Too many connections to an AppServer.

As few as 2-3 users can saturate an AppServer capable of hundreds of connections.

CAUSE:

4GL coding problem: the application is not disconnecting from the AppServer when it's supposed to, or repeatedly connects to the same AppServer.

FIX:

Make sure that the AppServers are disconnected appropriately.

As a debugging tool, you can add the following piece of code to your application's main program:

ON CTRL-SHIFT-F5 ANYWHERE DO:
DEF VAR hS AS HANDLE NO-UNDO.
DEF VAR iC AS INTEGER NO-UNDO.

ASSIGN iC = 0
hS = SESSION:FIRST-SERVER.
DO WHILE VALID-HANDLE(hS):
IF hS:CONNECTED() THEN
ASSIGN iC = iC + 1.
ASSIGN hS = hS:NEXT-SIBLING.
END.
MESSAGE "Number of connected AppServers:" iC
VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
END.

By pressing CTRL-SHIFT-F5 (but of course you can use any other hot key) a client will be able to know how many AppServer connections they are holding. Usually that should be 0 or 1. If the number of connected AppServers is higher than what you expect, you know that there is a 4GL coding problem.