SOLVED User Tracking search not working


  • Updated to Version 1.5.9.113 but behavior is still the same. Page never loads, just shows blank.

    URL:
    https://fogserver.my-domain.com/fog/management/index.php?node=report&sub=file&f=dXNlciB0cmFja2luZw%3D%3D

    tail /var/log/php-fpm/error.log shows nothing since I restarted it (the above search was performed after 14:43):

    [01-Dec-2021 14:43:58] NOTICE: exiting, bye-bye!
    [01-Dec-2021 14:43:58] NOTICE: fpm is running, pid 27319
    [01-Dec-2021 14:43:58] NOTICE: ready to handle connections
    [01-Dec-2021 14:43:58] NOTICE: systemd monitor interval set to 10000ms
    

  • I ended up searching for memory_limit in /etc/php*:

    grep -r memory_limit /etc/php*
    

    The two active files were /etc/php.ini and /etc/php-fpm.d/www.conf:

    /etc/php-fpm.d/www.conf:php_admin_value[memory_limit] = 1024M
    /etc/php-fpm.d/www.conf:;php_admin_value[memory_limit] = 256M
    /etc/php.ini:memory_limit = 512M
    /etc/php.ini:;memory_limit = 128M
    

    I duplicated the lines, commented out the original with ;, then quadrupled the values. Restarted the services with:

    systemctl restart httpd
    systemctl restart php-fpm.service
    

    User Tracking queries now work as expected.


  • @george1421 said in User Tracking search not working:

    little gear on original post

    I see no gear or settings on the original post, leading me to believe this is a moderator-only feature. Thank you for marking the solution!

  • Moderator

    @altitudehack The forum is a bit strange. You have to go into the forum post settings (little gear on original post) then set to ask as question. Once that is done you can mark the entire thread solved or pick the post with the right answer. I don’t know why the forum doesn’t default to every OP needs to be asked as a question. But it is what it is. I took care of it for you.


  • @george1421 How the heck do I mark the answer as solved on the forum?

  • Moderator

    @george1421 On the fog server linux console lets do this.

    cd /etc
    find ./ -name www.conf
    

    Find should return with some path to the config file
    ./php-fpm.d/www.conf

    Lets edit that file. I can’t give you the exact path because the config file moves depending on the version of php that’s installed.

    Search for php_admin_value[memory_limit] and make sure its set to 256MB

    php_admin_value[memory_limit] = 256M
    

    Make the change and reboot the server (easy) or restart php-fpm (slightly harder)

    Edit: OK I’m too slow between telephone calls and users stopping by. Looks like you hit the right area. Just watch out for RAM exhaustion if you bump the values up too high. The php-fpm process has up to 35 workers defined.


  • I ended up searching for memory_limit in /etc/php*:

    grep -r memory_limit /etc/php*
    

    The two active files were /etc/php.ini and /etc/php-fpm.d/www.conf:

    /etc/php-fpm.d/www.conf:php_admin_value[memory_limit] = 1024M
    /etc/php-fpm.d/www.conf:;php_admin_value[memory_limit] = 256M
    /etc/php.ini:memory_limit = 512M
    /etc/php.ini:;memory_limit = 128M
    

    I duplicated the lines, commented out the original with ;, then quadrupled the values. Restarted the services with:

    systemctl restart httpd
    systemctl restart php-fpm.service
    

    User Tracking queries now work as expected.

  • Moderator

    @altitudehack said in User Tracking search not working:

    So the question is where is there a limit of 134MB? Each php-fpm worker should have a 256MB limit. The issue is the size of what is being reported in the report is larger than a defined buffer. Let me look.


  • @george1421
    You’re right. Thanks for the tip!

    tail /var/log/httpd/ssl_error_log
    ...
    [Thu Dec 02 11:44:24.766930 2021] [php7:error] [pid 24293] [client my_IP:38154] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes) in /var/www/html/fog/lib/fog/fogcontroller.class.php on line 260, 
    
  • Moderator

    @altitudehack First let me say I don’t have an answer to this issue. But i can tell you that php-fpm will only throw an error If there is either a task timeout or there is a problem with the php programming code. I would also inspect the apache error log to see if php-fpm is working like it should but apache is unhappy with the report.


  • The data’s there, and it’s less than 5000 rows, so doesn’t seem like an excessive query:

    MariaDB [fog]> select * from userTracking;
    +------+----------+-------------+----------+---------------------+--------+------------+---------+
    | utID | utHostID | utUserName  | utAction | utDateTime          | utDesc | utDate     | utAnon3 |
    +------+----------+-------------+----------+---------------------+--------+------------+---------+
    ...
    ...
    | 4816 |       41 | jesie          | 1        | 2021-12-02 08:52:08 |        | 2021-12-02 |         |
    | 4817 |        6 | magpie         | 1        | 2021-12-02 08:59:26 |        | 2021-12-02 |         |
    | 4818 |       20 | lennard           | 1        | 2021-12-02 09:02:32 |        | 2021-12-02 |         |
    | 4819 |       57 | albatros         | 1        | 2021-12-02 10:19:25 |        | 2021-12-02 |         |
    +------+----------+----------------+----------+---------------------+--------+------------+---------+
    4819 rows in set (0.003 sec)
    

    It returns a blank page even when I specify a user and the machine they’re assigned to.

277
Online

9.1k
Users

15.7k
Topics

145.9k
Posts