SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations > SageMC Custom Interface
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageMC Custom Interface This forum is for discussing the user-created SageMC custom interface for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-26-2010, 12:10 PM
dead_ferrets dead_ferrets is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Ottawa, Ontario, Canada
Posts: 145
Java Memory Problem

Perhaps someone else has had this problem and can share their solution. I've allocated 1024MB to java memory. When I start the server my java memory reads about 80MB and over the course of a 3-4 days of extender use the entire 1024MB of memory is eventually consumed. Once that happens the extenders start to crawl and I need to restart the server.

Any thoughts on what is going on here?

My setup is pretty simple, a sage server running on a WHS serving up two HD-200 extenders. The only tuner I'm using is an HD-PVR.

I am running the latest version of SageMC, b_24 (though this problems was there with older versions as well) and I'm running the following add-ons:
-Jetty
-Jetty Sage Webserver
-BMT
-Sage Movie Wall
-TV Explorer
Reply With Quote
  #2  
Old 01-26-2010, 01:06 PM
MitchSchaft MitchSchaft is offline
Sage Expert
 
Join Date: Jan 2008
Posts: 717
What java version do you have?
Reply With Quote
  #3  
Old 01-26-2010, 01:19 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
If you have java6 (1.6) then you can consider using the jmap/jhat tools that are included with the java6 sdk. I haven't personally used these tools, but I've meaning to give them a try.

Use the heap analyzer, you should be able to see what type of objects are consuming the most memroy.
Reply With Quote
  #4  
Old 01-26-2010, 01:36 PM
dead_ferrets dead_ferrets is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Ottawa, Ontario, Canada
Posts: 145
I'm running the stock java 1.6.0.

I installed a newer version of java to get comskip up and running but sage didn't seem to pick that up for some reason.
Reply With Quote
  #5  
Old 01-26-2010, 02:12 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
One of the add ins is causing a memory leak. Eliminate them one by one until you find the offender and then report to the author. (It could also be SageMC with the memory leak, but others would have reported that by now.)
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #6  
Old 01-26-2010, 02:25 PM
dead_ferrets dead_ferrets is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Ottawa, Ontario, Canada
Posts: 145
I agree it has to be one of the add-ons but these are pretty popular add-ons that seem to be used by lots of people so I would have thought we'd be seeing more folks reporting java memory problems...

Anyway, I will have to set aside some time to take your advice!
Reply With Quote
  #7  
Old 01-26-2010, 07:16 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by dead_ferrets View Post
I agree it has to be one of the add-ons but these are pretty popular add-ons that seem to be used by lots of people so I would have thought we'd be seeing more folks reporting java memory problems...

Anyway, I will have to set aside some time to take your advice!
Keep in mind, Java is like the Borg of memory. It will consume all memory that is allocated to it... and it will never give it up. In java, memory leaks are typically shown because of OutOfMemory Exceptions. ie, Java can no longer consume any new memory and it can't free up existing memory. But, java will only really try to free up memory, if it can't allocate any new memory. So because of this, running any java application for any long period of time, it may look like there's a leak (because java constantly allocates memory, but never frees it), but in fact, there is only ever a "leak" if java runs out of memory.

As java allocates more memory, then it can slow down, since it is spending more time trying to find unused memory and reclaiming objects.

Something to consider as well, is looking at different ways that the java virtual machine can run it's garbarge collectors. I think i've posted before on garbarge collection, or a quick search might turn up some of those posts.

If you do find that it's a bmt issue, then feel free to pass along the details.

good luck
Reply With Quote
  #8  
Old 01-27-2010, 08:36 AM
dead_ferrets dead_ferrets is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Ottawa, Ontario, Canada
Posts: 145
Thanks Sean, this was very helpful. I know nothing about java or how java memory works so I had assumed because all memory was getting allocated I was still seeing the same pattern as before so I was restarting my server (to avoid the extender crashes/slowdowns) without giving java a chance to do garbage collection.

Yesterday the server had allocated all the memory and I didn't reset it. This morning I awoke to see that the free memory went up so garbage collection is now actually happening. This is new and so things seem to be working as expected. Before the amount of free memory just continually declined until there was nothing left, making my server very sad.

I seem to be hovering around 200-250MB of free memory with all 1024 allocated. I'll keep a close eye on it over the next few days but it looks promising.
Reply With Quote
  #9  
Old 02-19-2010, 03:25 PM
spook spook is offline
Sage User
 
Join Date: Aug 2006
Posts: 37
Getting rid of the Java heap setting, and disabling fanart fixed my troubles. But I couldn't just go back and disable the Java heap setting, I actually had to reinstall the OS... I was having this trouble awhile back as well... I seem to settle out around 500-550Meg of RAM.

Also, I stopped completely powering down the media extender(hd200) so much... IE completely powering it down.(not the power button)... I had my HD200 on a power strip that went off when I flipped the wall switch. Every time I powered that back on it would take 3+ minutes to resync to the server. after I took it off that switch, and just used the power button on the remote to power down, it would take 20-30sec to resync to the server.
Reply With Quote
  #10  
Old 02-19-2010, 03:32 PM
MitchSchaft MitchSchaft is offline
Sage Expert
 
Join Date: Jan 2008
Posts: 717
How can you live without fanart?
Reply With Quote
  #11  
Old 02-19-2010, 03:36 PM
spook spook is offline
Sage User
 
Join Date: Aug 2006
Posts: 37
I don't know if your joking, but I never used it, so I can't miss something I never used.
Reply With Quote
  #12  
Old 02-23-2010, 09:53 AM
dead_ferrets dead_ferrets is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Ottawa, Ontario, Canada
Posts: 145
Unfortunately I'm still seeing this problem. Server gobbles up all the memory then jugs away trying to free up unused memory. I haven't had any more time to troubleshoot so I've taken to restarting the server every week. A bit of pain but a work around nonetheless.

I use fanart all the time so I'm not prepared to give that up... yet.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HDX100 giving java out of memory error wit plugin srothwell SageTV Media Extender 0 01-09-2009 07:40 PM
Java out of memory errors while viewing pictures? Shield SageTV Software 8 11-04-2007 12:51 AM
Do I have a Java problem ? Box8489 SageTV Linux 3 02-17-2007 06:53 PM
Nvidia 6150 grid problem memory related? blade Hardware Support 6 10-16-2006 12:35 PM
Is there still a problem with caching/memory usage with 3.0.7? mkanet SageTV Beta Test Software 0 08-26-2005 06:42 PM


All times are GMT -6. The time now is 05:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.