Jump to content

100% cpu usage on 1 core (CentOS7)


ViolentVotan
Go to solution Solved by ViolentVotan,

Recommended Posts

ViolentVotan

Hello,

 

I am currently evaluating MediaBrowser as a possible replacement for Plex as it seems to sometimes just stop playing and keeps buffering forever.

 

Now for my MediaBrowser problem, since the server started it uses 100% CPU on 1 core. First I thought it would be due to indexing or some other background task but as this is going on for 6 days now I am fairly certain it is a problem. There are no ongoing tasks in the Dashboard and the only errors I see in the logfile are a few of these:

App: Error in Dynamic Image Provider
        *** Error Report ***
        Version: 3.0.5490.2
        Command line: /opt/MediaBrowser/MediaBrowserServer/bin/MediaBrowser.Server.Mono.exe -programdata /var/opt/MediaBrowser/MediaBrowserServer
        Operating system: Unix 3.10.0.123
        Processor count: 8
        64-Bit OS: True
        64-Bit Process: True
        Program data path: /var/opt/MediaBrowser/MediaBrowserServer
        Mono: 3.10.0 (tarball Sat Nov 15 01:59:43 UTC 2014)
        Application Path: /opt/MediaBrowser/MediaBrowserServer/bin/MediaBrowser.Server.Mono.exe
        A null reference or invalid value was found [GDI+ status: InvalidParameter]
        System.ArgumentException
          at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in <filename unknown>:0
          at System.Drawing.Image.CreateFromHandle (IntPtr handle) [0x00000] in <filename unknown>:0
          at System.Drawing.Image.LoadFromStream (System.IO.Stream stream, Boolean keepAlive) [0x00000] in <filename unknown>:0
          at System.Drawing.Image.FromStream (System.IO.Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) [0x00000] in <filename unknown>:0
          at MediaBrowser.Server.Implementations.Photos.DynamicImageHelpers+<GetSquareCollage>c__async1.MoveNext () [0x00000] in <filename unknown>:0
        --- End of stack trace from previous location where exception was thrown ---
          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
          at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.IO.Stream].GetResult () [0x00000] in <filename unknown>:0
          at MediaBrowser.Server.Implementations.Photos.BaseDynamicImageProvider`1+<CreateImageAsync>c__async3[MediaBrowser.Controller.Entities.PhotoAlbum].MoveNext () [0x00000] in <filename unknown>:0
        --- End of stack trace from previous location where exception was thrown ---
          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
          at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.IO.Stream].GetResult () [0x00000] in <filename unknown>:0
          at MediaBrowser.Server.Implementations.Photos.BaseDynamicImageProvider`1+<FetchAsyncInternal>c__async2[MediaBrowser.Controller.Entities.PhotoAlbum].MoveNext () [0x00000] in <filename unknown>:0
        --- End of stack trace from previous location where exception was thrown ---
          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
          at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Controller.Library.ItemUpdateType].GetResult () [0x00000] in <filename unknown>:0
          at MediaBrowser.Server.Implementations.Photos.BaseDynamicImageProvider`1+<FetchAsync>c__async1[MediaBrowser.Controller.Entities.PhotoAlbum].MoveNext () [0x00000] in <filename unknown>:0
        --- End of stack trace from previous location where exception was thrown ---
          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
          at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Controller.Library.ItemUpdateType].GetResult () [0x00000] in <filename unknown>:0
          at MediaBrowser.Server.Implementations.Photos.BaseDynamicImageProvider`1+<FetchAsync>c__async0[MediaBrowser.Controller.Entities.PhotoAlbum].MoveNext () [0x00000] in <filename unknown>:0
        --- End of stack trace from previous location where exception was thrown ---
          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
          at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[MediaBrowser.Controller.Library.ItemUpdateType].GetResult () [0x00000] in <filename unknown>:0
          at MediaBrowser.Providers.Manager.MetadataService`2+<RunCustomProvider>c__async3[MediaBrowser.Controller.Entities.PhotoAlbum,MediaBrowser.Controller.Providers.ItemLookupInfo].MoveNext () [0x00000] in <filename unknown>:0

I installed MediaBrowser following the instructions from the website, the box itself is a CentOS 7 machine with SELinux disabled and properly set up firewall rules.

 

Does anyone have an idea as to what's wrong?

Edited by ViolentVotan
Link to comment
Share on other sites

Can you see the images in the webserver? 

Did you add any media to the server, if so is it a big collection?

If you go to system monitor does it says the % for mono and start.sh?

Are you playing any files while you see the cpu at 100%?

Do you have enabled extract chapter images?

Link to comment
Share on other sites

ViolentVotan

Can you see the images in the webserver?

Yes, I see the Series/Movie Posters and Actor Portraits.

 

Did you add any media to the server, if so is it a big collection?

I added a folder with 3 Movies, and a Folder with about 120 Series Episodes

 

If you go to system monitor does it says the % for mono and start.sh?

Looking at htop, this process is using 1 core at 100%: /opt/mono/bin/mono MediaBrowser.Server.Mono.exe -programdata /var/opt/MediaBrowser/MediaBrowserServer

 

Are you playing any files while you see the cpu at 100%?

No, not used at all.

 

Do you have enabled extract chapter images?

Looking at the configuration screen, it seems I do not. None of the boxes are ticked.

Edited by ViolentVotan
Link to comment
Share on other sites

thefirstofthe300

Do you have a picture library? I have been having similar errors and the errors seem to be thrown when it is attempting to grind through the picture library. I have no idea why it is so finicky (bug in the library?).

Link to comment
Share on other sites

ViolentVotan

Do you have a picture library? I have been having similar errors and the errors seem to be thrown when it is attempting to grind through the picture library. I have no idea why it is so finicky (bug in the library?).

 

Infact, I do!

 

Now the problem si I cannot test it as I cannot change any settings, the problem that I mentioned in my other thread: http://mediabrowser.tv/community/index.php?/topic/17821-there-was-an-error-processing-the-request-please-try-again-later/

Link to comment
Share on other sites

thefirstofthe300

Hmm. You can't change any settings at all?

 

In the ${CONFIG}/root/default directory remove the directory that is the name of your pictures collection. That SHOULD get rid of the library totally. Restart the server and let us know what happens.

Link to comment
Share on other sites

thefirstofthe300

The other thing you can try is upgrading to the dev server. Picture processing has stabilized a lot it seems in the latest dev server. If this is a mission critical (wife ;)) rig, I wouldn't recommend it though.

Link to comment
Share on other sites

ViolentVotan

Hmm. You can't change any settings at all?

 

In the ${CONFIG}/root/default directory remove the directory that is the name of your pictures collection. That SHOULD get rid of the library totally. Restart the server and let us know what happens.

 

Some settings work, some dont. I get "There was an error processing the request. Please try again later." when like trying to add or change something in the library config or when I try to enable the subtitle downloading ... it's really annoying. It seems to also impact the functionality as it does show me that I stopped watching a show halfway thru, but wont let me resume at that spot... neither can I fastforward ... I am seriously considering giving plex another go if I dont get this fixed :/

Link to comment
Share on other sites

ViolentVotan

Removing the Images did infact fix the 100% problem and the error message in the logs :)

 

So this thread can be closed, the other problem is a lot more annoying :/

Link to comment
Share on other sites

thefirstofthe300

Well, I guess that is a good thing.

 

@@Luke I hope that I am right that the latest dev server has introduced improvements for photo processing.

Link to comment
Share on other sites

Removing the Images did infact fix the 100% problem and the error message in the logs :)

 

So this thread can be closed, the other problem is a lot more annoying :/

you can try the dev release to see if some of the issues are resolved. 

sudo yum-config-manager --enable MediaBrowserServer-Dev
sudo yum install MediaBrowserServer-dev

you can also try clearing you data path or using a new one

for a new a new one either create a .cfg file or edit the variable on the start.sh script.

 

the cfg file should be name 

/etc/opt/MediaBrowser/MediaBrowserServer/MediaBrowserServer.cfg

 

and put this line inside or modify the variable inside the start.sh script

 

program_data_path="/var/opt/MediaBrowser/MediaBrowserServer-Test"

 

you may need to give write permissions for the media or mediabrowserserver user to the MediaBrowser path. 

Link to comment
Share on other sites

ViolentVotan

you can try the dev release to see if some of the issues are resolved. 

sudo yum-config-manager --enable MediaBrowserServer-Dev
sudo yum install MediaBrowserServer-dev

you can also try clearing you data path or using a new one

for a new a new one either create a .cfg file or edit the variable on the start.sh script.

 

the cfg file should be name 

/etc/opt/MediaBrowser/MediaBrowserServer/MediaBrowserServer.cfg

 

and put this line inside or modify the variable inside the start.sh script

 

program_data_path="/var/opt/MediaBrowser/MediaBrowserServer-Test"

 

you may need to give write permissions for the media or mediabrowserserver user to the MediaBrowser path. 

 

So I installed the dev version now.

 

It seems that the /mediabrowser affix is no longer required in the url? Is that correct? Because I then have to change my reverse proxy settings.

 

Also, I do get an error from time to time that the page cannot be loaded and I have to hit F5 to refresh. In the logs of my reverse proxy I see this:

RESPONSE: sent 195.218.9.221 status 403 (Access Denied) for 'http://localhost:8096/Videos/ActiveEncodings?deviceId=0465863ed201a690d1f1faf7428b1e787e443575'

 

Is there some kind of timeout problem between my reverse proxy and MediaBrowserServer?

Edited by ViolentVotan
Link to comment
Share on other sites

thefirstofthe300

It isn't required but it should still work.

 

In regards to your other question, I have no experience with reverse proxies so I have no clue.

 

Sent from my Nexus 7. Pardon my spelling. :)

Link to comment
Share on other sites

  • Solution
ViolentVotan

The dev server works reasonable for pictures, but I still see cpu spikes form time to time so for now I will just not use the photos functionality.

 

As for my timeout / settings not being savec /  etc problems, I found the solution and closed the thread about it: http://mediabrowser.tv/community/index.php?/topic/17821-there-was-an-error-processing-the-request-please-try-again-later/&do=findComment&comment=173576

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...