Forum Post: RE: Memory leak in OpenEdge.Net.HTTP classes?

  • Thread starter Thread starter Peter Judge
  • Start date Start date
Status
Not open for further replies.
P

Peter Judge

Guest
One of the constructs the http client uses is a class called a ByteBucket. This object contains byte/memptr data and allows you to dynamically add data. There is an array of memptrs inside it, and these memptrs are created once and * reused *. The default is 3 16k memptrs. These memptrs should be destroyed/cleaned up when the ByteBucket is destroyed. You can check whether there's a leak on the ABL side by running the LOG-MANAGER for DynObjects.* which will log OOABL objects and memptr creation/destruction if memory serves. If there is a bug, please log it. -- peter From: pedromarcerodriguez [mailto:bounce-pedromarcerodriguez@community.progress.com] Sent: Monday, 01 June, 2015 11:48 To: TU.OE.Development@community.progress.com Subject: [Technical Users - OE Development] Memory leak in OpenEdge.Net.HTTP classes? Memory leak in OpenEdge.Net.HTTP classes? Thread created by pedromarcerodriguez Hi, I am using OpenEdge.Net.HTTP classes to populate an elasticSearch instance. To do it I am using the new available Openedge.Net.HTTP classes: USING OpenEdge.Net.HTTP.ClientBuilder FROM PROPATH. USING OpenEdge.Net.HTTP.IHttpRequest FROM PROPATH. USING OpenEdge.Net.HTTP.IHttpResponse FROM PROPATH. USING OpenEdge.Net.HTTP.RequestBuilder FROM PROPATH. USING Progress.Json.ObjectModel.JsonObject FROM PROPATH. DEFINE VARIABLE oRequest AS IhttpRequest NO-UNDO. DEFINE VARIABLE oResponse AS IhttpResponse NO-UNDO. DEFINE VARIABLE httpUrl AS CHARACTER NO-UNDO. DEFINE VARIABLE iCount AS INTEGER NO-UNDO. MESSAGE "Start" VIEW-AS ALERT-BOX. httpUrl = " http://localhost:9200/sports/customer ". FOR EACH customer no-lock: oRequest = RequestBuilder:Put(httpUrl + "/" + string(Customer.CustNum),new JsonObject()):Request. oResponse = ClientBuilder:Build():Client:Execute(oRequest). display customer.custNum. pause(0). END. This code executed with a running instance of ElasticSearch locally should work and the sports database is working fine, but I am finding that there are massive number of objects left behind, I am not sure if I am suppose to do some manual cleaning when using these classes or this code should be Ok like that and a lot of cleaning is missing in the OpenEdge.Net.HTTP classes. To give an idea of the problem, after executing this code, I am finding that the VM has grown to 247M. So, is it a problem of my code that should be use differently or is it the library not doing some cleansing? Cheers, Stop receiving emails on this subject. Flag this post as spam/abuse.

Continue reading...
 
Status
Not open for further replies.
Back
Top