This could very well just be limited to the order stats page. Looking at the code it loads a lot of data in memory to get the calculations. With a lot of orders, I could see this throwing an out of memory error. We should look at refactoring this to get counts instead of pulling large lists of records.
Andrew On Thu, Jul 9, 2009 at 9:07 AM, BJ Freeman<[email protected]> wrote: > I remember a discussion about a month ago where there would be memory > leaks where new code, written, that uses transactions did not close the > transaction properly. > > BJ Freeman sent the following on 7/8/2009 7:10 PM: >> I saw Adam heath in the dev list mention something. >> However as I said before I don't see my memory allocation creeping up >> and I have been running ofbiz 9.04 since it was released. >> so if there is a memory leak, I have not used the portions that have it >> or there is non. >> That is the best I can say. >> >> >> >> Kumaraswamy nandipati sent the following on 7/8/2009 7:05 PM: >>> BJ Freeman, >>> >>> As a technical person, >>> >>> I am curious to know what are the memory leaking areas in ofbiz? >>> (API methods, classes, etc.,) so, I can stop using them. Any information >>> will be appreciated. >>> >>> >>> >>> On Thu, Jul 9, 2009 at 3:26 AM, BJ Freeman <[email protected]> wrote: >>> >>>> an added information >>>> using swap file, called virtual memory in windows is many times slower >>>> than using real memory. This because you are using disk access times >>>> instead of real memory access times. >>>> So do everything you can not get into the virtual memory. >>>> >>>> Kumaraswamy nandipati sent the following on 7/8/2009 1:54 PM: >>>>> Thanks for your reply BJ Freeman & Henning. >>>>> >>>>> You people gave new dimention of solutions. I have to look into them. >>>>> >>>>> >>>>> By the way, I am using Debain server to host my ofbiz application. May be >>>>> its time to concentrate on memory leaks. >>>>> >>>>> thanks once again for showing way to success(I feel). >>>>> >>>>> I am novise to linux script coding. My another question *is Is there a >>>>> autoScheduler which will identify whether a ofbiz instance is running or >>>>> not. If not, it will schedule(start) ofbiz automatically*. Because of my >>>>> existing server condition(memory leaks), I need to use that scheduler >>>> till >>>>> fix the memory leaks. Because, my ofbiz application was shutting down at >>>> any >>>>> time of clock. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Wed, Jul 8, 2009 at 9:43 PM, Henning <[email protected]> wrote: >>>>> >>>>>> Btw.: There is a great memory analyzer tool available for eclipse - a >>>> real >>>>>> life saver. >>>>>> >>>>>> See www.eclipse.org/mat. >>>>>> >>>>>> As your configuration will have given you heap dumps, why not let that >>>> tool >>>>>> have a look at those? There is a "leak suspects" analysis available that >>>>>> quite often leads to the hot spot. >>>>>> >>>>>> Henning >>>>>> >>>>>> -- Urspr. Mitt. -- >>>>>> Betreff: Re: Auto scheduler to start ofbiz instance required. >>>>>> Von: BJ Freeman <[email protected]> >>>>>> Datum: 08.07.2009 18:03 >>>>>> >>>>>> I run ofbiz and it only takes 700K I have 2 megs memory and never use >>>>>> swap file. There is not memory leaks that I can see, my server has been >>>>>> up for 14 days since my last restart to add code. >>>>>> as side note: >>>>>> if your using windows and a swapfile extensively, you system will hang. >>>>>> So I would start by having a server with one instance to verify that it >>>>>> is ofbiz or a modification you have done. Then work back. >>>>>> >>>>>> >>>>>> Kumaraswamy nandipati sent the following on 7/8/2009 8:42 AM: >>>>>>> Hi., >>>>>>> >>>>>>> I am using Ofbiz for my ecommerce application. Due to memory issues >>>>>> server >>>>>>> geting shutdown. >>>>>>> >>>>>>> My ofbiz server hosted with memory information as follows >>>>>>> Primary memory : 4GB( 50% as swap) >>>>>>> >>>>>>> here is memory information in startup script: >>>>>>> >>>>>>> MEMIF="-server -Xverify:none -Xms1024M -Xmx1536M -XX:MaxPermSize=1024M >>>>>>> -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParNewGC >>>>>>> -XX:+CMSClassUnloadingEnabled -XX:+UseAdaptiveSizePolicy" >>>>>>> >>>>>>> >>>>>>> My application has two instances on two different machines for load >>>>>>> balancing called *Frontend* and *Backend*(all other modules except >>>>>> ecommerce >>>>>>> module). both are different ofbiz instances for my website synchronized >>>>>> at >>>>>>> apache level. >>>>>>> >>>>>>> I am having 2 issues >>>>>>> 1.P) When I open order stats page, backend ofbiz was getting down for >>>>>> some >>>>>>> times because of out of memory issue. In orderstats page, its trying to >>>>>>> travel each and every order in current year for stat information. Till >>>>>> now >>>>>>> in current year, my application had 10K orders, This may holds huge >>>>>> memory I >>>>>>> think. >>>>>>> >>>>>>> 2.P) My application(ecommerce module i.e Frontend) was running fine for >>>>>> 4-5 >>>>>>> days, after that, it is shutting down because outOfMemory issue. >>>>>>> >>>>>>> In both ofbiz instances, I am using cache management for certain things >>>>>> upto >>>>>>> 3 hrs of cacheing. >>>>>>> >>>>>>> Seriously these are two issues pointing me >>>>>>> >>>>>>> Before find a solution for this, I want to use a scheduler/cron which >>>>>> will >>>>>>> identify server down and restart the server automatically and in >>>>>> meanwhile I >>>>>>> has to fix this issue. >>>>>>> >>>>>>> Any suggestions are appriciated towards this. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> -- >>>>>> BJ Freeman >>>>>> http://www.businessesnetwork.com/automation >>>>>> http://bjfreeman.elance.com >>>>>> >>>>>> >>>> http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro >>>>>> Systems Integrator. >>>>>> >>>>>> >>>>>> >>>> -- >>>> BJ Freeman >>>> http://www.businessesnetwork.com/automation >>>> http://bjfreeman.elance.com >>>> >>>> http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro >>>> Systems Integrator. >>>> >>>> >>> >> > > -- > BJ Freeman > http://www.businessesnetwork.com/automation > http://bjfreeman.elance.com > http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro > Systems Integrator. > >
