Memory leak when using SESSION:CURRENT-REQUEST-INFO

Posted by Paul Radbone on 16-Dec-2014 04:43

Hi,

I have an issue with some code that I'm trialling (REST service, code running on appserver).

If I run this code in a method called from the REST service, I get a memory leak on the appserver.  Looking at the Server Pool Control in the Openedge Explorer, every time the method is run, the memory usage increases.  I left this over the course of a day and both servers were using 500MB of memory.

MESSAGE SESSION:CURRENT-REQUEST-INFO:ClientContextId.

temp = SESSION:CURRENT-REQUEST-INFO:GetClientPrincipal().
l_user_id = temp:USER-ID.
DELETE OBJECT temp.

I get the issue with either of the SESSION:CURRENT-REQUEST-INFO: statements.  If I comment these two statements out of the code, the memory usage is normal.  If I leave either statement in the code, the memory usage increases.

Am I doing something wrong or is this a bug?

All Replies

Posted by James Palmer on 16-Dec-2014 04:47

Hi Paul,

It might be helpful to know what Progress version this is on.

James

Posted by Paul Radbone on 16-Dec-2014 04:51

Hi,

sorry, this is 11.3.

Posted by Michael Jacobs on 16-Dec-2014 04:58

Paul,

by looking at your code I would not expect the memory consumption to increase.   I think you've pointed out a memory leak problem that should be reported and resolved.

Mike J.

Posted by Irfan on 16-Dec-2014 04:58

I will try to reproduce this issue(with 11.5) . I am not sure why would it create a leak for just holding or printing the client-principal for a session.

Posted by jmls on 16-Dec-2014 07:14

it may be linked to this statement in the get-client() method of the
security-policy handle:

"To avoid a memory leak, you must explicitly delete the
client-principal object whose handle is returned by this method when
you no longer need it."

if the class in question is getting the CP, and not deleting it then
this may be the leak

Julian

On 16 December 2014 at 10:59, Irfan wrote:
> RE: Memory leak when using SESSION:CURRENT-REQUEST-INFO
> Reply by Irfan
>
> I will try to reproduce this issue(with 11.5) . I am not sure why would it
> create a leak for just holding or printing the client-principal for a
> session.
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.



--
Julian Lyndon-Smith
IT Director,
dot.r
http://www.dotr.com

Posted by Fernando Souza on 16-Dec-2014 08:00

This is definitely a bug. Please report it to Technical Support so we can address it.

In the meantime, as a workaround, assign SESSION:CURRENT-REQUEST-INFO to a variable and access the property from it. For example:

DEF VAR reqObj AS Progress.Lang.OERequestInfo NO-UNDO.

reqObj = SESSION:CURRENT-REQUEST-INFO.

temp = reqObj:GetClientPrincipal().

l_user_id = temp:USER-ID.

Posted by Paul Radbone on 16-Dec-2014 09:38

I've opened a support case.  Thanks for the workaround.

This thread is closed