[ZBX-22582] PHP-fpm processes high cpu utilization Created: 2023 Mar 24 Updated: 2023 Aug 29 |
|
Status: | Open |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 6.2.8 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Grigoriy Efremov | Assignee: | Aigars Kadikis |
Resolution: | Unresolved | Votes: | 1 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Operating System: Ubuntu 22.04.2 LTS |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
||||
Issue Links: |
|
Description |
Steps to reproduce:
Result: |
Comments |
Comment by Aigars Kadikis [ 2023 Mar 27 ] |
I see you are using almost the most recent software in any category. Thank you for testing out these components. The patchs mentioned in strace.log 1) Do you use stock Zabbix packages on Ubuntu 22? apt list --installed | grep zabbix 2) Does Zabbix frontend is exposed to internet? If yes, could you try to reconfigure the web server port to listen on a different port (not use 80/443)? See if the CPU usage goes away. |
Comment by Grigoriy Efremov [ 2023 Mar 27 ] |
1) yes I'm using packages from official repo: https://repo.zabbix.com/zabbix/6.2/ubuntu jammy main 2) уes, frontend is exposed to internet. I can't reconfigure the web server port to listen on a different port, we use several services like grafana to integrate zabbix through api |
Comment by Aigars Kadikis [ 2023 Apr 17 ] |
ZBX-22582.patch.and.files.zip BTW, this is an interesting findings which can lower down CPU usage for different Zabbix builds. We will wait for your feedback. Patch is only applicable for 6.2.x. "autoload.php" is a new file and must be placed in the /usr/share/zabbix |
Comment by Grigoriy Efremov [ 2023 Apr 18 ] |
I've placed file "autoload.php" in /usr/share/zabbix. There is the same file in /usr/share/zabbix/vendor/, should I replace it? |
Comment by Gregory Chalenko [ 2023 Apr 18 ] |
efremovgv you do not need to replace vendor/autoload.php file, just place new one in same directory where zabbix.php file is. Also please apply the patch otherwise autoloader will not start. When applied there will be much less "No such file or directory", error still be present because local directory files also as modules directory files cannot be added to autoloader.php. |
Comment by Grigoriy Efremov [ 2023 Apr 18 ] |
Also please apply the patch otherwise autoloader will not start what does it mean? I've just unzip ZBX-22582.patch.and.files.zip |
Comment by Gregory Chalenko [ 2023 Apr 18 ] |
Go to /usr/share/zabbix directory, unzip and then execute git apply ZBX-22582.txt to apply changes to zabbix.php and index.php files. |
Comment by Alexander Plotnikov [ 2023 Apr 18 ] |
When trying to apply the patch, the following error occurs. Is it necessary to change the path inside ZBX-22582.txt ? |
Comment by Gregory Chalenko [ 2023 Apr 18 ] |
Sorry patch was created as for Zabbix installed from git repository. Attached correct ZBX-22582.patch |
Comment by Alexander Plotnikov [ 2023 May 11 ] |
Is there such a patch for version 6.4.*? After upgrading from 6.2.9 to 6.4.2, the problem with user time cpu and total load returned |
Comment by Aigars Kadikis [ 2023 May 22 ] |
Hello Glafkon , Please download index.php /usr/share/zabbix/zabbix.php /usr/share/zabbix/index.php This is tested and suitable for Zabbix 6.4.2. Let us know if CPU loading issue goes away. |
Comment by Aigars Kadikis [ 2023 May 22 ] |
Hello efremovgv , please download 6.2.9.index.php /usr/share/zabbix/zabbix.php /usr/share/zabbix/index.php This is suitable for Zabbix 6.2.9. Let us know if it solves CPU problem. |
Comment by Grigoriy Efremov [ 2023 May 22 ] |
Thanks, I've alrady update on 6.4.2. I'll try files for 6.4.* |
Comment by Aigars Kadikis [ 2023 Jun 20 ] |
Hello Glafkon , efremovgv . Would you mind trying to patch and report back CPU usage? |
Comment by Grigoriy Efremov [ 2023 Jun 20 ] |
CPU usage is fine, thanks for the patch |
Comment by Aigars Kadikis [ 2023 Jun 20 ] |
I did miss an important statement. Appart from: /usr/share/zabbix/zabbix.php /usr/share/zabbix/index.php There also must be autoload.php /usr/share/zabbix/autoload.php This will do the optimal loading. Take a screenshot of CPU usage. Then install this file. Have a look of CPU usage again for "php-fpm" process. |
Comment by Alexander Plotnikov [ 2023 Jun 20 ] |
Aigars Kadikis Hello. This version autoload.php (which you attached) file compatibility with Zabbix 6.4.3 version? |
Comment by Gregory Chalenko [ 2023 Jun 22 ] |
Yes it is compatible with version 6.4.3 |
Comment by Alexander Plotnikov [ 2023 Aug 28 ] |
Unfortunately, the problem persists. When opening 6-8 graphs (in different browser tabs) in 1 day (last 1 day), the load on the CPU increases dramatically. UPD. |