Page 1 of 1

Out of Memory error

PostPosted: Wed Apr 21, 2010 12:00 am
by jpeterson
java.lang.OutOfMemoryError

this is the error i have now encountered after successfully using the web player within my network.

i have not been able to get it or the isub player to work outside of my network.

any suggestions or tips to explore?

thanks.

Out of Memory error

PostPosted: Wed Apr 21, 2010 12:14 am
by jpeterson
Further to my post above, here are is the sidebar error message.

Exception java.lang.OutOfMemoryError
Message Java heap space
Java version Apple Inc. 1.6.0_17
Operating system Mac OS X 10.6.3
Server jetty-6.1.x
Memory Used 61 of 61 MB
Stack trace java.lang.OutOfMemoryError: Java heap space at java.util.regex.Pattern$BnM.optimize(Pattern.java:4912) at java.util.regex.Pattern.compile(Pattern.java:1473) at java.util.regex.Pattern.(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at java.lang.String.split(String.java:2292) at net.sourceforge.subsonic.service.SearchService$Line.parse(SearchService.java:725) at net.sourceforge.subsonic.service.SearchService.getIndex(SearchService.java:603) at net.sourceforge.subsonic.service.SearchService.getStatistics(SearchService.java:349) at net.sourceforge.subsonic.controller.LeftController.handleRequestInternal(LeftController.java:120) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) at javax.servlet.http.HttpServlet.service(HttpServlet.java:715) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

PostPosted: Wed Apr 21, 2010 12:37 am
by einsteinx2
Looks like you need to raise Subsonic's memory limit. That is done differently depending on what system you are running it on. What system are you running? Mac, Windows, or Linux?

As an example, on my Ubuntu Linux system using the .deb installer package, I had to change my /etc/defaults/subsonic file to include --max-memory=512 in the SUBSONIC_ARGS line to set my server to use 512mb max memory.

PostPosted: Wed Apr 21, 2010 12:52 am
by jpeterson
I am running this on a Mac OS 10.6.3.

PostPosted: Wed Apr 21, 2010 1:50 am
by jpeterson
Found it!

right click on the subsonic application in finder
show package contents

>contents
info.plist

open info.plist

change the java memory allocation line from 64 to a higher value. I made mine 512.

<key>VMOptions</key>
<string>-Xmx64m</string>

<key>VMOptions</key>
<string>-Xmx512m</string>

et voila!
Now to try and figure out the isub connection!?

PostPosted: Wed Apr 21, 2010 3:00 am
by einsteinx2
jpeterson wrote:Now to try and figure out the isub connection!?


Once you have it up and running, all you need to do is get the port forwarded in your router and you'll be good to go. Here are some instructions for OS X:

These instructions are using Snow Leopard but it should be pretty similar on Leopard or Tiger. Just got to System Preferences on your Mac, then go to Network, and click on the Network connection on the left that you use for internet (should either be Ethernet or Airport, one will have a green circle next to it). Then click the Advanced button on the button right and choose the TCP/IP tab. You're gonna need to write down 2 IP addresses: IPv4 Address and Router. Now in your browser, type the router address and hit enter. That should take you to your router setup page. Once in there, try to find something called Applications and Gaming or something similar. It should ask for an IP address, an external port, and an internal port. You would put your IPv4 Address from the Network settings page and port 4040 for both external and internal addresses. And if it asks, forward TCP traffic.

Once all that's done, go to dyndns.com sign up to get a URL and download their dynamic IP software. You just install it on your computer and log into your just created dyndns account and it will automatically make the URL you chose point to your home computer even when your cable or dsl provider changes your IP (which happens ever day to every week or longer depending on your provider). Also, donating to the Subsonic project will get you a yourname.subsonic.org URL that you can use instead of dyndns.

Now you can just point your browser to whateveryoupicked.dyndns.com:4040 or whateveryoupicked.subsonic.org and it should go to your subsonic server if it's all setup. Then you just put that address, plus your subsonic username and password into iSub and you're good to go.

PostPosted: Wed Sep 15, 2010 11:27 am
by danielr
It looks like you have to do this again after updating the server if you are on a Mac.

I updated to 4.1 from 4.0.1 last night and right away started having problems with my large playlists. I looked at this setting at it was set to the default 100m yet I had increased it when I originally setup 4.0.1.

Every other setting and preference on the Mac seems to have carried over just fine and everything works great.

Re: Out of Memory error

PostPosted: Sun Aug 28, 2011 12:49 pm
by jaymacke
This is crucial information for all Mac subsonic users. Every time I upgrade I go through this process. Some moderator should star this thread, because I always have to looking for it! :)

Re: Out of Memory error

PostPosted: Sun Aug 28, 2011 3:55 pm
by BKKKPewsey
I think the best place for ALL those solutions /hints /how to's etc is to add them to the wiki.

It would be good if we could mark a post as solution found as in other tech b. boards which would then aid the wiki editors.

Perhaps some sort of feedback score? :|
Remember we all use different OS's so a solution to a Linux or OSX problem (as a windoze user)
will mean nothing to me eg does it work or not etc without feedback from the users who tried the mod out.

So the solution is read the thread http://forum.subsonic.org/forum/viewtopic.php?f=4&t=4145 and get editing :mrgreen: