Hello,
Good Morning.
We are using version 2.0.6.
At some point; I do not know when; access to the home page was slow.
Loading times; monitoring via Debug in firefox.
https://10.154.4.103/nagioslogserver/ (Home) 10313ms
https://10.154.4.103/nagioslogserver/dashboard (Dashboards) 388ms
https://10.154.4.103/nagioslogserver/alerts (Alerting) 313ms
https://10.154.4.103/nagioslogserver/configure (Configure) 533ms
https://10.154.4.103/nagioslogserver/help (Help) 409ms
https://10.154.4.103/nagioslogserver/admin (Admin) 891ms
Charging time takes 8 to 11 seconds; this is bad because it is common for users to return the home page to open the links to global dashboards.
I can not tell if the slowdown exists from the beginning of the deployment; or if it started after some update.
Only access to the home page is slow; access to all other pages occurs in less than 1 second.
I tried to monitor the apache logs; but I could not find out anything.
There is no difference in time; if accessed via IP; domain; http; https; it is always the same symptom; only on the home page.
Slow access to home page
-
- Posts: 91
- Joined: Wed Dec 07, 2016 6:02 pm
Slow access to home page
You do not have the required permissions to view the files attached to this post.
-
- Support Tech
- Posts: 5045
- Joined: Tue Feb 07, 2017 11:26 am
Re: Slow access to home page
The only thing I can see that may require some time to load would be the graph showing the last 15 minutes worth of logs. Try disabling this and see if the performance improves. It can disabled by editing /var/www/html/nagioslogserver/application/views/home.php, and commenting out line 43:
#load_highcharts();
#load_highcharts();
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 91
- Joined: Wed Dec 07, 2016 6:02 pm
Re: Slow access to home page
Hi Cdienger;
I did some tests; but editing the views / home.php file has not improved.
I removed 100% of the contents of the file; leaving it blank.
When I refresh the page, it takes the same 8-10 seconds (without displaying anything because I removed the content;
Apparently there is some processing on a layer outside the view; could you pass me the list of files that run in the home page rendering? It may be something on the control layer; etc.
It's very weird; all pages load super fast.
Currently we have about 600 hosts sending logs; I even thought it might be the algorithm that counts the amount of hosts, to display on the home page; but I did not find the logic in the vision.
I did some tests; but editing the views / home.php file has not improved.
I removed 100% of the contents of the file; leaving it blank.
When I refresh the page, it takes the same 8-10 seconds (without displaying anything because I removed the content;
Apparently there is some processing on a layer outside the view; could you pass me the list of files that run in the home page rendering? It may be something on the control layer; etc.
It's very weird; all pages load super fast.
Currently we have about 600 hosts sending logs; I even thought it might be the algorithm that counts the amount of hosts, to display on the home page; but I did not find the logic in the vision.
-
- Support Tech
- Posts: 5045
- Joined: Tue Feb 07, 2017 11:26 am
Re: Slow access to home page
The initial request for /nagioslogserver/ will make a request to /var/www/html/nagioslogserver/www/index.php which then loads the home.php file. I wouldn't suspect this though since it is also responsible for loading the other views in the UI.
Even with everything in home.php removed, there are still calls on the backend to the elasticsearch database. You can see these if you run a tcpdump on the NLS machine. Attached is a screenshot of all the requests I saw on a lab machine when home.php was made blank. I would look for any delayed responses using the filter "http.request || http.response" as well as dns delays by running the filter "dns".
Even with everything in home.php removed, there are still calls on the backend to the elasticsearch database. You can see these if you run a tcpdump on the NLS machine. Attached is a screenshot of all the requests I saw on a lab machine when home.php was made blank. I would look for any delayed responses using the filter "http.request || http.response" as well as dns delays by running the filter "dns".
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 91
- Joined: Wed Dec 07, 2016 6:02 pm
Re: Slow access to home page
Hi cdienger;
I'm trying to degubate.
I put some echos with datetime in the page index.php
The highest processing is in the codeIgniter.php file include
I believe it might be some routine that calculates the data that is displayed on the home page. For example, the number of hosts
I'm looking for where this CodeIgniter.php file is for further analysis.
/var/www/html/nagioslogserver/www/index.php
[2018-11-22 16:27:29.202852]
[2018-11-22 16:27:37.826567]
~8.5 seconds
I'm trying to degubate.
I put some echos with datetime in the page index.php
The highest processing is in the codeIgniter.php file include
I believe it might be some routine that calculates the data that is displayed on the home page. For example, the number of hosts
I'm looking for where this CodeIgniter.php file is for further analysis.
/var/www/html/nagioslogserver/www/index.php
Code: Select all
...
echo ("[" . date('Y-m-d H:i:s.') . gettimeofday()['usec'] . "]<br>");
require_once BASEPATH.'core/CodeIgniter.php';
echo ("[" . date('Y-m-d H:i:s.') . gettimeofday()['usec'] . "]<br>");
[2018-11-22 16:27:37.826567]
~8.5 seconds
-
- Posts: 91
- Joined: Wed Dec 07, 2016 6:02 pm
Re: Slow access to home page
The high processing time, occurs in the call of the function "call_user_func_array"
A11[2018-11-22 17:19:27.814953]
A12[2018-11-22 17:19:36.117721]
A13[2018-11-22 17:19:36.117745]
A11[2018-11-22 17:19:27.814953]
A12[2018-11-22 17:19:36.117721]
A13[2018-11-22 17:19:36.117745]
You do not have the required permissions to view the files attached to this post.
-
- Support Tech
- Posts: 5045
- Joined: Tue Feb 07, 2017 11:26 am
Re: Slow access to home page
Does the tcpdump show any specific request taking a long time to get a response? This can help narrow down which callback may be giving call_user_func_array a problem.
Do you see errors or warnings logged in the apache logs when reproducing? Run:
tail -f /var/log/httpd/*
Do you see errors or warnings logged in the apache logs when reproducing? Run:
tail -f /var/log/httpd/*
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 91
- Joined: Wed Dec 07, 2016 6:02 pm
Re: Slow access to home page
Hi cdienger
It was necessary to disable infrastructure SSL, so that it could perform tests via HTTP.
The tests result in the same values initially collected via debug in firefox. There are no secondary calls that are causing slowness. It is the processing of page page index.php, through the function mentioned, which generates slowness.
In internet searches, I could verify that there is a lot of discussion about the performance of the function.
We own approximately 45 global dashboads, and 650 hosts (these are the data that appear on the home page).
We have no more to test, because we do not know how the application was developed. And I was not able to debug the values passed to the function. Number of items in the array, etc.
Ref https://www.youtube.com/watch?v=k3TXtoH-ZJA
It was necessary to disable infrastructure SSL, so that it could perform tests via HTTP.
The tests result in the same values initially collected via debug in firefox. There are no secondary calls that are causing slowness. It is the processing of page page index.php, through the function mentioned, which generates slowness.
In internet searches, I could verify that there is a lot of discussion about the performance of the function.
We own approximately 45 global dashboads, and 650 hosts (these are the data that appear on the home page).
We have no more to test, because we do not know how the application was developed. And I was not able to debug the values passed to the function. Number of items in the array, etc.
Ref https://www.youtube.com/watch?v=k3TXtoH-ZJA
You do not have the required permissions to view the files attached to this post.
-
- Support Tech
- Posts: 5045
- Joined: Tue Feb 07, 2017 11:26 am
Re: Slow access to home page
Can you PM me the pcap file? There should be a number of internal calls to the localhost that I would like to review.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 91
- Joined: Wed Dec 07, 2016 6:02 pm
Re: Slow access to home page
I sent the file via pm; as requested.
Thank you
Thank you