DO NOT DELETE THIS INFORMATION.
Please read this information carefully.
Please read this information carefully.
GitHub issues is for feature requests or bugs, please do not post issues asking for help or how to do X, Y or Z.
You can use our irc channel ##librenms on freenode to ask questions or our community site.
Please confirm each of the sections below by putting an x in the box like [x].
LibreNMS | 3807ec9
DB Schema | 157
PHP | 7.0.13-0ubuntu0.16.04.1
MySQL | 10.0.28-MariaDB-0ubuntu0.16.04.1
RRDTool | 1.5.5
SNMP | NET-SNMP 5.7.3
I had an issue with a client on 14.04 and Apache just crawling. There were < 10 devices being monitored, all Cisco gear.. almost all modules turned off. It was a PC, not a server, so the first thing I did was add RRDCACHED, verified it was working. Still, just terribly slow.
We started over with a real server (I have this running on servers for about 10 of my clients right now, so this was not my first time installing or tweaking). It is still terrible! Very slow to bring up some pages??
I am a network guy, not really a software guy, so I started searching for troubleshooting Apache issues. Then I remember I have NFSen also running on this box.. and it runs great??
So I watch 'top' and get the process ID of Apache skyrocketing. I do a "strace -p XXXX" and BOOM.. here is what I see:
stat("/opt/librenms/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/HTML", 0x7fff27ef0820) = -1 ENOENT (No such file or directory)
access("/opt/librenms/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer", W_OK) = -1 EACCES (Permission denied)
There are hundreds of these lines every time I click on a device. I have access to one of my older clients and their LibreNMS install (that is also up to date). There is a directory missing in the newer install (I have verified twice, by just starting on a totally new install):
root@nms:~# stat /opt/librenms/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/HTML | grep Acc
Access: (0755/drwxr-xr-x) Uid: ( 999/librenms) Gid: ( 999/librenms)
Access: 2017-01-19 16:25:19.455990986 -0600
root@il-itlibrenms:~# stat /opt/librenms/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/HTML | grep access
stat: cannot stat '/opt/librenms/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/HTML': No such file or directory
I can copy over the HTML directory from the old server and put it on the new server.. the performance improves.. but it is still slower.
What to do here?
Can you try this patch:
diff --git a/includes/common.php b/includes/common.php
index 040e846..0120a12 100644
@@ -1503,9 +1503,10 @@ function clean($value)
- $purifier = new HTMLPurifier(
+ global $config;
+ $p_config = HTMLPurifier_Config::createDefault();
+ $p_config->set('Cache.SerializerPath', $config['temp_dir']);
+ $purifier = new HTMLPurifier($p_config);
I am sorry to be such a beginner here.. but I tried to do some reading and did this:
Am I even close??
git apply p1.patch would be fine, if it still doesn't work add a new line to the bottom of the patch
It was the line at the bottom! Thanks!
As this thing runs, it seems to pick up speed. Now I can't tell if the patch helped. I still see Apache freak, but just for a second or two (I also see rrdcached, but that never gets to ~90% like Apache). I did copy that directory over from another customer:
...so now this server has that directory. If I pause over the device and let the 6 mini-graphs fill out, the click is almost instantaneous.. but not all the time. I am starting to think this might have something to do with their internal network. The performance is just a little better than when it was on an old PC. NONE of my other customers are experiencing anything like this. And one of my customers has over 10,000 ports now.
I would like to test back and forth.. how do I remove that patch? Thanks for your help. This is a new customer and I have had such good luck with Nacho that this is my standard offering. The guys is being cool about it, though.. he loves the interface. Everyone does!
git checkout includes/common.php
I'll probably pr this fix up anyway.
Thanks again! I did revert back.. just to see if the guy notices. Thanks again for your help!!
fix: HTML Purifier would create tmp caches within the vendor folder, …
…moved to users tmp dir #5561
…moved to users tmp dir #5561 (#5596)