Listing all hosts gives me an “HTTP ERROR 500”
-
@sebastian-roth Hey man! I’m not able to view all of the hosts on the web ui. Whenever I click on list all hosts, it gives me an “HTTP ERROR 500”. We have over a 1,000 hosts registered in fog, is there a limit on how many you can view at one time? The same thing happens when we try to view the whole image history log or try and export all of our hosts. Any suggestions?
-
@djslimd1k Lets look in the error logs to find out a bit more about the error. I have a good idea, but let the logs tell us what’s wrong. If you look in the fog server console, at /var/logs depending on the host OS it will be in http or apache the error log file. If you tail that you may see something about a timeout.
The look at /var/log/php-fpm tail the error logs there.
Post both results in the forum here.
-
-
@george1421 I’m running the latest dev-branch, 1.5.9.36.
-
@djslimd1k Ok the line of “Allowed memory size of XXXX has been exhausted” is the telling bit.
What that is saying is the php-fpm worker is running out of memory trying to display this list. To fix it do the following.
somewhere in /etc there is a file called www.conf this is the configuration file for php-fpm. The somewhere part comes from the location changes depending on the version of php that is installed. To locate it key in
find /etc -name www.conf
that should tell you the location of it. Then you can use vi or nano to edit the file and search for this linephp_admin_value[memory_limit] = 256M
Change that 256MB to a higher value be conservative, you can go to 372M or 512M. This impacts all php-fpm workers so you want to watch your max ram of the system so you don’t starve either the workers or the OS from available RAM.
Make the change and save the settings then issue
sudo systemctl restart php-fpm
to pick up the new changes. This should give you more ram to display the larger host sets. -
@george1421 That did the trick! Thank you very much! In that same file that I opened, could I also increase the amount of handlers? Is that recommend? Is there any settings I could change to try and lower the amount of CPU usage the handlers need?
-
@djslimd1k Are you running into performance issues with this system?
If you look at
top
and sort byP
rocessor what is your top task? mssql? Is it above 40%How many fog clients do you have in your environment?
Lastly if you have the ram, you can increase the number of maximum handlers to 50 from 35. You may need to allocate 6GB of ram to the target computer. If you start dipping into swap space, then add more vRAM to the FOG server.