angusleung 6 Posted July 17, 2017 Share Posted July 17, 2017 I have been using emby with Cloudflare more than a year and everything running good until few weeks ago the server start running slow. It happen when I reload the webpage few time. The time took to reload the page is about 1 min to 2 min I noticed that there are about hundred threads were created when I reload the page when I access it with my domain name. And emby will start running slow when threads more than 200-300. It won't happen when I access locally and the number of threads are around 30 to 40. I have tried to disable all caching related features on Cloudflare (Paging rule, rocket loader, Auto Minify, etc.) to see if its help , but no luck. I tried everything I could do this few weeks and finally I think I could look for help on the forum. Does anyone faced similar situation and would give me some advice? I have attached the server log and some screenshot. I am running Version 3.2.25.0 on ubuntu 16.04 server.txt Link to comment Share on other sites More sharing options...
Luke 37238 Posted July 17, 2017 Share Posted July 17, 2017 Hi there, to improve the performance of emby server, try removing all plugins. To improve even more, try a fresh install only this time do not ever install any plugins. Thanks ! Link to comment Share on other sites More sharing options...
angusleung 6 Posted July 17, 2017 Author Share Posted July 17, 2017 After removed all plugin, I remove emby-server and reinstall it again. The loading speed does not improved. server-63635944803.txt Link to comment Share on other sites More sharing options...
Luke 37238 Posted July 17, 2017 Share Posted July 17, 2017 What exactly is loading slow? I don't see anything too bad in this log. Thanks. Link to comment Share on other sites More sharing options...
mastrmind11 717 Posted July 17, 2017 Share Posted July 17, 2017 I have a similar htop. When you search for a process it doesn't filter other threads. My guess is that you have less than 100 threads for Emby.... you have to count them. eg, my htop w/ emby filtered shows 1176 threads, 84 of which are Emby. In other words, get better hardware and/or Emby is not the problem. Link to comment Share on other sites More sharing options...
Luke 37238 Posted July 17, 2017 Share Posted July 17, 2017 thanks @@mastrmind11 ! 1 Link to comment Share on other sites More sharing options...
angusleung 6 Posted July 18, 2017 Author Share Posted July 18, 2017 (edited) Thanks for the advice of Luke and mastermind11. I would recently replace it with new hardware just wait and see if AMD Ryzen APU is a deal. I do not see any abnormal from the log too.... I know it might not related with the performance of emby-server, because when I am out of home an access it via Android app and it has perfect speed and response time. The issue only exist when I access via webclient. So I think it should related with the misconfigure of Cloudflare setting. I recently kill the emby when the thread more than 300 via the following script and start if the pid of emby is not exsit. I placed them in crontab @@reboot to standby #!/bin/bash while :; do tcount=0 tcount=$(ps -ef | grep -v awk | grep -v root | awk '/emby-server/{print $2 }' | while read line ; do ps -T -p $line | wc -l; done) if [ $tcount -gt 300 ]; then #service emby-server stop >> /home/ubuntu/cron/log.txt ps -ef | grep -v awk | grep -v root | awk '/emby-server/{print $2 }' | while read line;do kill -9 $line; done echo $tcount >> /home/ubuntu/cron/log.txt fi sleep 10 done #!/bin/bash while :; do if [ ! -f /var/run/emby-server.pid ] then sudo /etc/init.d/emby-server start >> log.txt echo `date` "EMBY STARTED" >> log.txt fi sleep 10 done The hardware of my setting is as following. i5 357016GB ram(non-ECC)8X4TB 120G SSD ZFS Raid Z1 (8GB Zil + 100GB L2ARC) Running on Proxmox 5.0 LXC (ubuntu 16.04 LTS) Sorry for my English, as it is not my native language. Edited July 19, 2017 by angusleung Link to comment Share on other sites More sharing options...
angusleung 6 Posted July 19, 2017 Author Share Posted July 19, 2017 Ok, turns out the speed issue is about the setting of Cloudflare. I try to access my server via external IP and domain name, the speed is significantly difference. I tried several difference setting, turn on minifiy and rocket. The speed seems slightly improved. Once again, thanks for the support. Link to comment Share on other sites More sharing options...
Solution pir8radio 1293 Posted July 20, 2017 Solution Share Posted July 20, 2017 Ok, turns out the speed issue is about the setting of Cloudflare. I try to access my server via external IP and domain name, the speed is significantly difference. I tried several difference setting, turn on minifiy and rocket. The speed seems slightly improved. Once again, thanks for the support. You will find some of cloudflares speed settings should not be enabled. Rocketloader causes some issues, so does minifiing. Make sure your cache level is set to STANDARD (important), and create this rule: without this rule emby images don't get cached because they are .webp images with no extension. Use chrome, right click the page go to inspect, select "NETWORK" tab, check the disable cache box. Add a column/header "cf-cache-status" this will show you what was actually cached on cloudflare.. see below image, the majority of your content should say "HIT" after you reload the page a few times... There on out HIT should be listed for most everything. 2 Link to comment Share on other sites More sharing options...
angusleung 6 Posted July 21, 2017 Author Share Posted July 21, 2017 (edited) @@pir8radio Thanks for your friendly advice. And I have the best config on Cloudflare ever. Edited July 21, 2017 by angusleung 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now