Salesforce

.NET Open Client disconnect messages not received by PASOE

« Go Back

Information

 
Title.NET Open Client disconnect messages not received by PASOE
URL NameNET-Open-Client-disconnect-messages-not-received-by-PASOE
Article Number000116072
EnvironmentProduct: OpenEdge
Version: 11.6.x, 11.7.x, 12.x
OS: Windows
Other: .NET Open Client
Question/Problem Description
.NET Open Client disconnect messages not received by PASOE.

.NET Open Client does not fully disconnect from PASOE.

If a client is closed then the associated PASOE session is not removed.

Logging onto, and off from, PASOE using a .NET Open Client shows that there are number of Connections and Sessions created, but no Disconnections.

Checking PASOE metrics for the APSV transport using http://localhost:8910/oemanager/applications/oepas1/webapps/ROOT/transports/apsv/metrics returns a result similar to the following:

{"result":{
"statusRequests":0,
"connectRequests":12,
"sessionErrors":0,
"connectErrors":0,
"disconnectRequests":0,
"sessionRequests":12,
"disconnectErrors":0,
"forbiddenErrors":0,
"type":"OE_APSV_TRANSPORT",
"startTime":"2017-10-31T08:23:21.060+01:00",
"accessTime":"2017-10-31T08:25:19.333+01:00"},
"operation":"GET APSV TRANSPORT STATISTICS",
"versionStr":"v11.6.3 ( 2017-04-18 )",
"errmsg":"","outcome":"SUCCESS",
"versionNo":1


Connections: 12
Sessions: 12
Disconnections: 0

Checking Requests made to PASOE also shows a discrepancy, with only connections showing in localhost_access_log.YYYY-MM-DD.txt:

Each CONNHDL value should appear twice, reflecting a login and logout, e.g.

10.0.0.10 - - [DD/Mmm/YYYY:HH:MM:SS +0200] "POST /apsv?
&CONNHDL=59CB0E70500686087ADFFDBCF510F42C7425B3879961.oepas1 HTTP/1.1" 200 295 188
10.0.0.10 - - [DD/Mmm/YYYY:HH:MM:SS +0200] "POST /apsv?
&CONNHDL=59CB0E70500686087ADFFDBCF510F42C7425B3879961.oepas1 HTTP/1.1" 200 62 2


But the second entry with the 62 byte payload is missing in the log.

.NET Open Client code disconnects using the following code:
if (Proxy != null)
{
    Proxy.Shutdown();
    Proxy.Dispose();
    Proxy = null;
}

if (connection != null)
{
    connection.ReleaseConnection();
    connection.Dispose();
    connection = null;
}
Steps to Reproduce
Clarifying Information
Leaving connections and sessions in place can lead to resource problems where eventually the Java process consumes about 1,2 GB memory, high CPU and "java.lang.OutOfMemoryError: Java heap space" errors, then all sessions stop responding.
Error Message
Defect Number
Enhancement Number
Cause
The call to the Shutdown() method of the Proxy performs an unconditional disconnect; the socket is disconnected but without a disconnect message being sent to the server.
Resolution
1) Comment or remove the Shutdown() method call on the .NET proxy.
dotNETProxy.Shutdown();

2) Ensure that the Dispose() method of the Proxy and ReleaseConnection() method of the Connection are called in this order to fully disconnect the .NET client from PASOE.
dotNETProxy.Dispose();                // Disconnect the application from the AppServer
Connection.ReleaseConnection();       // Release the connection held by the Connection object.
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 6:56 AM

Powered by