Feedback
Did this article resolve your question/issue?

   

Article

Graceful trim PASOE Agent terminates the client connection 7243 7241

« Go Back

Information

 
TitleGraceful trim PASOE Agent terminates the client connection 7243 7241
URL Nametrim-pasoe-closes-connection-7243-7241-000089066
Article Number000145107
EnvironmentProduct: OpenEdge
Version: 11.5x, 11.6x, 11.7.1, 11.7.2
OS: All supported platforms
Question/Problem Description
A pasoe request throught Java openclient terminates with errors (7243)(7241)
The ABL Agent Session is ACTIVE when the Multi-Session Agent is trimmed
The MS-agent is stopped immediately, irrespective of whether the agent is idle or serving a request currently

The PASOE server is trimmed through the REST API interface which kills the request
curl -X DELETE -v http://uid:pwd@localhost:<port>/oemanager/applications/<App_name>/agents/pid

The following EXCEPTION is reported:

Reason: com.progress.open4gl.RunTime4GLStopException: 4GL STOP condition: The Server application has returned an error. (7243) (7241)
at com.progress.open4gl.javaproxy.ProObject.runProcedure(ProObject.java:331)
at com.progress.open4gl.javaproxy.OpenAppObjectImpl.runProc(OpenAppObjectIm...
at com.progress.open4gl.javaproxy.OpenAppObjectImpl.runProc(OpenAppObject.java:331
at <url>.openedge.SessionBase.runProcedure(SessionBase.java:157)
Steps to Reproduce
Clarifying Information
The expectation is that the ACTIVE Agent Session is allowed sometime to complete its work before the MS-Agent is stopped
Error MessageThe Server application has returned an error. (7243)
4GL STOP condition: <message text> (7241)
Defect Number
Enhancement Number
Cause
Resolution
Upgrade to OpenEdge 11.7.3 Service Pack.  

Two product improvements have been implemented: the first will alleviate this problem, the second will ensure new request continuity.

1. The ability to stop a MS-agent and specify how long it needs to wait for requests to complete (waitToFinish in milliseconds) before a STOP message is sent to the agent to shutdown.

Additionally, force it to shut down when it should not wait any longer (waitAfterStop in milliseconds). If the MS-agent finishes processing its current
request before waitToFinish expires, the agent will immediately shut down, otherwise a KILL message is sent to the MS-agent once waitAfterStop has expired:
 
//host_name:port/oemanager/applications/App_name/agents/agentID?waitToFinish=120000&waitAfterStop=10000

This may still end up sending a STOP condition to the running process when the ACTIVE session thread is terminated. The STOP condition still needs to be properly handled on the client side in the application code for a complete solution. 

2.  The ability to manually start an(other) agent through the REST API (also JMX and JConsole)

When an MS-Agent is stopped, there's a time delay in starting a new one to handle requests. Being able to preemptively start another MS-Agent is useful as this allows it to be available to handle requests before stopping the existing MS-Agent.
 
curl -X POST -v http://host_name:port/oemanager/applications/App_name/addAgent
Workaround
In OpenEdge 11.7.2, configure 2 agents that start up with PASOE with the minimum agents set to 2 by using numInitialAgents=2 with the (new in 11.7.2) minAgents=2 .

By configuring it this way, there are multiple MS-agents serving requests and having a spare at any one time ( for which the improvement described above in 11.7.3 to manually start the extra agent)

When a MS-agent is instructed to stop via the REST API to the agent with the offending ABL sessions:
curl -X DELETE //host_name:port/oemanager/applications/App_name/agents/agentID
  • The MS-agent will stop taking requests and after 10 seconds it will shut down that agent (which gives most requests time to finish, for which the improvement in 11.7.3 to make this time configurable described above). 
  • The second MS-agent is already online which can start handling client requests when the first MS-agent is stopped.
  • The minAgents will ensure that a new agent is started providing a spare for the next time a MS-agent needs to be stopped
Notes
Last Modified Date11/20/2020 7:09 AM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.