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?
Hi Paul,
It might be helpful to know what Progress version this is on.
James
Hi,
sorry, this is 11.3.
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.
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.
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
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.
I've opened a support case. Thanks for the workaround.