Page 1 of 1

Excess Postre Sessions?

PostPosted: Tue Dec 11, 2012 3:14 am
by suttonbm
I couldn't find any comments on this issue anywhere else... It seems that Music Cabinet is opening up a large number of postresql sessions and not closing them out. I'm running on a pretty lightweight atom server, and since I switched from vanilla over to MC, the whole server has slowed way down from it.

Has anyone else had this issue/have any tips? I'm not sure this is really an MC issue vs. a postgre configuration issue.

Thanks!

Re: Excess Postre Sessions?

PostPosted: Tue Dec 11, 2012 5:07 am
by GJ51
Yes. I noticed it was happening on my Music Cabinet server as well, but didn't investigate further. I believe I had 20-30 sessions open, but they weren't consuming CPU cycles while I was monitorinf it so I didn't think it was problematic; but yes, I noticed this too.

Checking now, I have 32 postgres processes running - bot consuming any significant CPU power, but each instance is taking 1 - 10mb of memory. Currently running MC on a Wnn Server 08 VM w/2gb ram allocated with nothing but MC running is currently using 1GB ram.

Turning Tomcat off drops memory usage to 643MB. Restarting Tomcat brings ram usage back up to 920MB.


Version Subsonic, originally written by Sindre Mehus. Built with MusicCabinet plugin, version 0.7.15, on November 29, 2012.
Server Apache Tomcat/6.0.36, java 1.7.0_07, Windows Server 2008 R2 (125.8 MB / 186.1 MB)

Re: Excess Postre Sessions?

PostPosted: Tue Dec 11, 2012 5:57 am
by hakko
I guess I could turn down the initial connection pool size a little and just allow it to grow on heavy usage. The nightly import is multi-threaded and will need around 10 connections, though.

Apart from that change on my side, I guess you should look into PostgreSQL configuration options. MusicCabinet is by design very database oriented and PostgreSQL is doing a lot of job (generating artist radio playlists on demand etc). As with any application, the more memory you can allocate to it, the snappier it gets so it's just a tradeoff between what resources you have and what user experience you get. The size of your library is also relevant, it's easier generating artist radio playlists from a 10k library than from a 100k song library of course.