[ZBX-20650] After updating to version 6.0, template import hangs Created: 2022 Feb 22 Updated: 2024 Apr 10 Resolved: 2022 Mar 25 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 6.0.0 |
Fix Version/s: | 6.0.3rc1, 6.2.0alpha1, 6.2 (plan) |
Type: | Problem report | Priority: | Blocker |
Reporter: | SartuS | Assignee: | Alexander Vladishev |
Resolution: | Fixed | Votes: | 15 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() |
||||||||||||||||
Issue Links: |
|
||||||||||||||||
Team: | |||||||||||||||||
Sprint: | Sprint 86 (Mar 2022) | ||||||||||||||||
Story Points: | 2 |
Description |
After updating to version 6.0, template import hangs |
Comments |
Comment by xffan [ 2022 Feb 23 ] |
I have the same problem |
Comment by Dariusz [ 2022 Feb 23 ] |
Me too, after upgrade from zabbix 5.4 to 6.0 |
Comment by Edgars Melveris [ 2022 Feb 24 ] |
Hello! Can you give more details, which exact template you're unable to import? Is it some specific template or all? |
Comment by Dariusz [ 2022 Feb 24 ] |
I am not sure if it is impacted with all templates, I tried with this one (template_app_vmware.6.0.yml) |
Comment by Edgars Melveris [ 2022 Feb 24 ] |
I tested and it works well here. How long did you wait for the import to finish? |
Comment by Dariusz [ 2022 Feb 24 ] |
Have you upgraded zabbix from 5.4 to 6.0? It just stuck while importing: |
Comment by Edgars Melveris [ 2022 Feb 24 ] |
Yes, this installation is upgraded from 5.2->5.4->6.0 Do you see anything in the web server/php logs? What DB backend are you using? |
Comment by Dariusz [ 2022 Feb 24 ] |
In logs, there is nothing special but maybe you will tell me what should I look for? Server version: 10.6.7-MariaDB-1:10.6.7+maria~bionic mariadb.org binary distribution - upgraded too |
Comment by Edgars Melveris [ 2022 Feb 24 ] |
Please run these commands on DB: show create database zabbix; show create table hosts;
|
Comment by Dariusz [ 2022 Feb 24 ] |
show create database zabbix |
Comment by Edgars Melveris [ 2022 Feb 24 ] |
Have you tested if the same problem happens on a new installation? You could do that by creating a new DB on the same DB host and then pointing frontend to it. You don't even need server to test template import.
|
Comment by Alan Civita [ 2022 Feb 24 ] |
Same issue here. To make the import work i had to increase the value of php_value[memory_limit] = 128M To php_value[memory_limit] = 1G in the file /etc/php-fpm.d/zabbix.conf and restart the php-fpm service. I've tried with 256M and 512M values but it didn't help.
|
Comment by Alan Civita [ 2022 Feb 24 ] |
this is pretty clear doing a status of php-fpm service during the template import systemctl status php-fpm.service |
Comment by Dariusz [ 2022 Feb 25 ] |
When I created a new database on my Zabbix server, the frontend stops running. I have changed all required parameters but... it's weird. Back to the previous database setting - start working again. I have installed php7.4-fpm service, but there is no /etc/php-fpm.d/zabbix.conf file. I have increased memory_limit settings to 1G in /etc/php/7.4/apache2/php.ini but nothing has changed, still can not import the template. Anyway, on the fresh installation of Zabbix 6.0 (new Ubuntu, Zabbix, MariaDB packages), the template can be imported without any issue.
|
Comment by SartuS [ 2022 Feb 25 ] |
php_value[memory_limit] = 1G screenshot taken during import |
Comment by Dariusz [ 2022 Feb 25 ] |
I do not have /etc/php-fpm.d/zabbix.conf file, will it be the same to change it into /etc/php/7.4/apache2/php.ini? I have deleted an old VMWare template from zabbix and imported a new one (for 6.0), it works. The template has been imported. |
Comment by Edgars Melveris [ 2022 Feb 25 ] |
if /etc/php-fpm.d/zabbix.conf is used by default depends on what OS it's installed on. I am currently not able to reproduce the problem |
Comment by SartuS [ 2022 Feb 26 ] |
/etc/php/7.4/fpm/pool.d/zabbix-php-fpm.conf this edit does not fix the bug |
Comment by Peter Kocian [ 2022 Feb 26 ] |
set memory_limit = 1G in /etc/php/7.4/fpm/php.ini it's solved problem for me. |
Comment by SartuS [ 2022 Feb 28 ] |
set memory_limit = 1G in /etc/php/7.4/fpm/php.ini didn't help me |
Comment by Peter Holzleitner [ 2022 Mar 02 ] |
Had same problem, Ubuntu 20.04, Zabbix 6.0.0 (upgraded 4.0 - 5.0 - 6.0) FPM memory limit 1G fixed the problem. @SartuS: Did you run systemctl restart php7.4-fpm after changing the config? |
Comment by SartuS [ 2022 Mar 05 ] |
yes |
Comment by Onkel Titus [ 2022 Mar 09 ] |
Same issue ( Upgrade from 5 to 6.0.1) , Increase of the PHP Memory to 1G didn't fix it |
Comment by Ben M [ 2022 Mar 13 ] |
Same issue here while attempting import of template_fortinet_all_discovery Set php_value[memory_limit] = 1G and restarted php7.4-fpm, this did not fix the issue. Ubuntu 20.04 LTS, zabbix 6.0 (upgraded), php7.4 |
Comment by Alan Civita [ 2022 Mar 13 ] |
Hi Ben M and Onkel, 1G is a value that is ok for my env but it could not be for yours. Have you tried to increase the value to 2G while monitoring, during the import, how much memory the process is consuming? I suggest to leave at 1G at first, run the import, and monitor the process ram usage during the import (systemctl status php7.4-fpm or ystemctl status php-fpm it depends on your OS) to see if the problem is the memory limit. If the memory hits the 1G then try to increase the value to 1.5 or 2G and restart the service and try again.
Alan |
Comment by Ben M [ 2022 Mar 13 ] |
Thanks Alan; I tried another import, this time watching the process (watch systemctl status php7.4-fpm) but it never changed from 14.8M. So I might be running up against a different issue than what you saw. Just to make sure, I changed the memory limit to 2G, restarted the service, re-attempted import, but no luck. To note, I do not show the same zabbix process running under fpm: CGroup: /system.slice/php7.4-fpm.service And my config file is in a different location: /etc/zabbix/php-fpm.conf |
Comment by Cristian Mammoli [ 2022 Mar 18 ] |
I'm hitting the same problem. Some info that could be useful for troubleshooting:
|
Comment by Daniele Pilenga [ 2022 Mar 18 ] |
I found that changing the limit in include/db.inc.php, line 624, from $MAX_NUM_IN = 950 to $MAX_NUM_IN = 9500 let me access the latest data of a host which has more than 200 items a lot quicker. This procedure is the same used to build the SELECT...IN which Cristian Mammoli talks about above, and should help therefore the import process. It still takes a lot, on our system (6.0.2, on PostgreSQL 13), but it completes. I had to raise the various timeouts above 10 minutes, though, to not have PHP interrupt the process or the browser give up. Hope this helps, in the meantime |
Comment by Frank Ansari [ 2022 Mar 21 ] |
I have the same issue with Zabbix 6.0.2. These are our components: timescale/timescaledb:2.6.0-pg14 zabbix/zabbix-server-pgsql:alpine-6.0.2 zabbix/zabbix-web-nginx-pgsql:alpine-6.0.2 zabbix/zabbix-proxy-sqlite3:alpine-6.0.2 On our productive system I cannot import templates anymore. As mentioned here the problems are the triggers. In my case also discovery rules get stuck at import. I have put the php.ini settings mentioned here and the db.inc.php setting. Nevertheless so far I had no success. To test this I have cut down a template until the first trigger. Without the trigger everything else gets imported. With the first trigger the systems gets stuck. How can this be fixed? I want to import this template: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/6.0 |
Comment by Frank Ansari [ 2022 Mar 21 ] |
For my case I could fix the issue with this setting for the web container: --env ZBX_MEMORYLIMIT=1G |
Comment by Dariusz [ 2022 Mar 22 ] |
I stuck with MySQL by ODBC too (https://www.zabbix.com/integrations/mysql#mysql_odbc). No success with any solutions |
Comment by Tony Mitts [ 2022 Mar 24 ] |
I have verified that this problems exists when the template has any TRIGGERS defined. No triggers and the template imports. |
Comment by Jan Paul [ 2022 Mar 25 ] |
I have the same issues, and can confirm that it is certanly TRIGGER related. Removing all triggers from the .yaml file, and the import was successful. After importing the template without the triggers, I tried to import the original (with triggers) again. That did not help unfortunately. Also unchecking every box, except the triggers did not resolve the issue. |
Comment by Alexander Vladishev [ 2022 Mar 25 ] |
Fixed in:
|
Comment by SKE [ 2023 Feb 13 ] |
I am facing similar issue with 6.0.13 after upgrading from 5.4 but with Maps. Neither yaml nor xml maps that were exported on 5.4 can be imported on 6.0.13.
|