Jump to content

Extreme Memory Leak


Koleckai Silvestri

Recommended Posts

dmtudder

My setup is win7 x86 running MB3 and wmc 6.1.7. Using a xbox360 as an extender.  You  may very well be correct, because while the extender is active; my used memory (windows not 360) gradually increases until I get a warning to close programs or I get an "out of memory" error.  

 

The only reason I was suspecting the MB is because the rate in which the memory leaks is greater when I am browsing, or the menu is displayed...

 

FYI:  If you add all memory reported as used by each program, they add to about 1.5 GB used.  However, 2+ GB of memory is being leaked outside of that reported by the OS.  I have 4GB of RAM 3.8 usable.  when about 2 GB of memory has been leaked (usually after 1 movie 1.5 movies), I get the error...

Edited by dmtudder
Link to comment
Share on other sites

If your ISOs don't allow you to stay in that framework, you can certainly use the results to pinpoint the problem...

 

I don't understand that statement...

 

But, you also didn't answer my question.  Is your library primarily made up of (or at least do you have a lot of) ISO disc rips?  If so, we may be able to pinpoint this issue to a 3rd-party utility we are utilizing.

Link to comment
Share on other sites

Koleckai Silvestri

It actually sounds like the memory issues is when it calls external resources like players and extenders and that isn't being released properly. I don't use those and my memory usage is stable across the board. Only restart MediaBrowser Server when there is an update and it streams video daily to multiple devices and clients. Google Chrome uses more memory than MediaBrowser.

  • Like 1
Link to comment
Share on other sites

How much memory is reported in use by ehexthost.exe?

 

The extender technology is a hack of the RDP implementation in Windows 7 and it isn't very good.  Wouldn't surprise me at all if there were memory leaks in it.  I know it will hang and crash if you give it too much network traffic like with high bitrate files or lots of hi-res graphics.

Link to comment
Share on other sites

dmtudder

I found that the leak occurs without using your MB service. I played video with only the MS software in play and the leak is obvious.  I'll bug MS for the answer now.  I'm sure Bill will get right on it!!  Sorry to bug you folks.

Link to comment
Share on other sites

dmtudder

Sorry we are talking different languages.  I thought you were referring to industry standards for coding as in ISO9000.  Now that I see your referring to disk images.  I only use three formats primarily avi, but mp4 and mkv also.  

 

I am a real-time programmer for the military..  We talk about ISO all the time.. Different monster!!

Link to comment
Share on other sites

Okay, so your issue isn't the ISO one.

 

You said it occurs when you use your extender.  What, exactly, is using memory in this instance?  The server, ehome? ehexthost?  What process?

Link to comment
Share on other sites

miket5au

I have the beta server installed on a Quad core 2.5GHz 8GB Win7 ultimate PC which also runs MBC (it is the louge room media centre).

 

I was getting multiple out of memory exceptions (dialog box) every day. Many times it would happen overnight and I would have to walk my wife through restarting it over the phone.

 

I have been reducing the amount of media in the media library (i have reduced it by about a third so far but can't do more without moving stuff around on my file server). This has reduced the frequency of the out of memory crashes

 

I find that a "Out of memory" dialog box is still happening daily and the server has stopped. When I check task manager while the server is running it is using about a gig of memory but I have no idea what it was when the exception occured.

 

What is the limit on number of items in the library?

Link to comment
Share on other sites

  • 3 weeks later...

Just wanted to note that I was having this problem - MediaBrowser would run out of memory (8GB) - and based on the information in this thread I removed any folders in my library that contained ISOs. Following that I haven't had the problem. I made the change about three days ago, and until then I was getting the memory error almost every day.

Link to comment
Share on other sites

Just wanted to note that I was having this problem - MediaBrowser would run out of memory (8GB) - and based on the information in this thread I removed any folders in my library that contained ISOs. Following that I haven't had the problem. I made the change about three days ago, and until then I was getting the memory error almost every day.

 

Another finger pointing at Pismo, I'm afraid.

Link to comment
Share on other sites

That doesn't really mean anything. Pismo is used only during the first time library scan when something is discovered, and then if you try to transcode an iso. That's it. So unless you're deleting your database on a daily basis and starting from scratch Pismo is not being used which means the crash is coming from elsewhere.

Link to comment
Share on other sites

snazy2000

I had ran out of memory error other day watching for 45 mins on a roku crashed the server I don't have any I so images and was playing a mp4 file. I have 14gb ram in my server and when I looked MB said wasn't using much and I had loads of ram free but MB said ran out of ram. :(

 

Sent from my HTC One using Tapatalk

Link to comment
Share on other sites

That doesn't really mean anything. Pismo is used only during the first time library scan when something is discovered, and then if you try to transcode an iso. That's it. So unless you're deleting your database on a daily basis and starting from scratch Pismo is not being used which means the crash is coming from elsewhere.

 

No, that would be madness. Actually, even though I thought it went away, I just got the memory low error message from Windows - but when I checked processes MB Server was only using a couple hundred MB of my 8GB RAM. In fact, over half the memory was unused by processes. Confusing.

Link to comment
Share on other sites

In addition to the memory low error from Windows, I discovered about a half-dozen error messages stating "Insufficient memory..." After closing a single error message, they all closed, and MB Server quit.

Link to comment
Share on other sites

The server is a 32bit process so it can only address 2GB of your 16.  And, when memory is requested, it needs to be able to find a large enough available contiguous block.  So, in short, you can "run out of memory" when you still actually have a lot of it available.

Link to comment
Share on other sites

We can start laying the building blocks. @@ebr after the release if you could change the installer back to any cpu that would be step 1.

Link to comment
Share on other sites

We can, but I'm not sure how much good that's gonna do us.  

 

Considering we really are working towards getting leaner and running on smaller platforms, I would think increasing our address space beyond 2GB isn't going to get us much.  

 

And, if it complicates our installation such that then we have to package, store and deliver two different builds and determine which one to install, I really don't think it is worth it.

Link to comment
Share on other sites

I'm aware of 32-bit process limitations - I'm a dev myself - but what doesn't make sense to me is 1) what could cause MB Server to use more than 2GB of memory (most of the time I don't see it go much over 250 MB), and 2) how is it even possible that a process built in .NET runs out of memory (shouldn't the GC or virtual memory protect against that by deallocating or swapping pages)?

 

If you'd rather not share the intimate details, I understand. But let me know if I can help debug by outputting logs, etc.

Link to comment
Share on other sites

I'm aware of 32-bit process limitations - I'm a dev myself - but what doesn't make sense to me is 1) what could cause MB Server to use more than 2GB of memory (most of the time I don't see it go much over 250 MB), and 2) how is it even possible that a process built in .NET runs out of memory (shouldn't the GC or virtual memory protect against that by deallocating or swapping pages)?

 

If you'd rather not share the intimate details, I understand. But let me know if I can help debug by outputting logs, etc.

 

There are limits to the sizes of collections, both in terms of bytes and counts, and these limits are a lot lower for a 32-bit process. So that's why you can see this crash even with the server only consuming 250mb of memory. It is a brief spike that causes it. Anyhow once you've got the new server please report your results. Also consider joining the dev group.

Link to comment
Share on other sites

  • 2 weeks later...

Just wanted to give an update. I continue to get the warning messages from Windows daily, but I haven't gotten the "Insufficient memory" error that caused MBServer to close.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...