glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.1k stars 1.27k forks source link

After update to glpi10 too long open computers #12364

Closed f0rextazy closed 1 year ago

f0rextazy commented 2 years ago

Code of Conduct

Is there an existing issue for this?

Version

GLPI 10.0.2

Bug description

After update from GLPI 9.4.5 to GLPI 10.0.2 page computer too long opening. htop show 100% cpu on maridb when opening computer page. I set on slow_query_log in maridb and get query working about 15 second

Relevant log output

# Time: 220802 11:14:24
# User@Host: glpi[glpi] @ localhost []
# Thread_id: 27391  Schema: glpi  QC_hit: No
# Query_time: 14.843729  Lock_time: 0.000259  Rows_sent: 30  Rows_examined: 9675963
# Rows_affected: 0  Bytes_sent: 29704
SET timestamp=1659428064;
SELECT DISTINCT `glpi_computers`.`id` AS id, 'RFirsanov' AS currentuser,
                        `glpi_computers`.`entities_id`, `glpi_computers`.`is_recursive`,  `glpi_computers`.`name` AS `ITEM_Computer_1`,
                        `glpi_computers`.`id` AS `ITEM_Computer_1_id`,
                        `glpi_entities`.`completename` AS `ITEM_Computer_80`,  `glpi_computers`.`id` AS `ITEM_Computer_2`,  `glpi_manufacturers`.`name` AS `ITEM_Computer_23`,  `glpi_computermodels`.`name` AS `ITEM_Computer_40`,  `glpi_computers`.`serial` AS `ITEM_Computer_5`,   GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_items_disks`.`encryption_tool`, '__NULL__'),
                                               '$#$',`glpi_items_disks`.`id`) ORDER BY `glpi_items_disks`.`id` SEPARATOR '$$##$$')
                              AS `ITEM_Computer_175`,

                  `glpi_locations`.`completename` AS `ITEM_Computer_3`,  `glpi_computers`.`comment` AS `ITEM_Computer_16`,   `glpi_users`.`name` AS `ITEM_Computer_70`,
                        `glpi_users`.`realname` AS `ITEM_Computer_70_realname`,
                        `glpi_users`.`id`  AS `ITEM_Computer_70_id`,
                        `glpi_users`.`firstname` AS `ITEM_Computer_70_firstname`,
                         GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_ipaddresses_937b8c393ea02752d06397f2628684f5`.`name`, '__NULL__'),
                                               '$#$',`glpi_ipaddresses_937b8c393ea02752d06397f2628684f5`.`id`) ORDER BY `glpi_ipaddresses_937b8c393ea02752d06397f2628684f5`.`id` SEPARATOR '$$##$$')
                              AS `ITEM_Computer_126`,

                   GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_networkports`.`mac`, '__NULL__'),
                                               '$#$',`glpi_networkports`.`id`) ORDER BY `glpi_networkports`.`id` SEPARATOR '$$##$$')
                              AS `ITEM_Computer_21`,

                  `glpi_operatingsystems_9719987b154aaf3b42c3db32aef59090`.`name` AS `ITEM_Computer_45`,  `glpi_operatingsystemkernels_a989ea68abd3f2b55fb5e7d2dcd8477d`.`name` AS `ITEM_Computer_64`,  `glpi_computers`.`date_creation` AS `ITEM_Computer_121`,  `glpi_computers`.`date_mod` AS `ITEM_Computer_19`,   GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_wifinetworks_29f46d60d7ee1157e60e5048796a9ca8`.`name`, '__NULL__'),
                                               '$#$',`glpi_wifinetworks_29f46d60d7ee1157e60e5048796a9ca8`.`id`) ORDER BY `glpi_wifinetworks_29f46d60d7ee1157e60e5048796a9ca8`.`id` SEPARATOR '$$##$$')
                              AS `ITEM_Computer_157` FROM `glpi_computers`LEFT JOIN `glpi_entities` 
                                          ON (`glpi_computers`.`entities_id` = `glpi_entities`.`id`
                                              )LEFT JOIN `glpi_manufacturers` 
                                          ON (`glpi_computers`.`manufacturers_id` = `glpi_manufacturers`.`id`
                                              )LEFT JOIN `glpi_computermodels` 
                                          ON (`glpi_computers`.`computermodels_id` = `glpi_computermodels`.`id`
                                              ) LEFT JOIN `glpi_items_disks` 
                                          ON (`glpi_computers`.`id` = `glpi_items_disks`.`items_id`
                                              AND `glpi_items_disks`.`itemtype` = 'Computer'
                                              ) LEFT JOIN `glpi_locations` 
                                          ON (`glpi_computers`.`locations_id` = `glpi_locations`.`id`
                                              )LEFT JOIN `glpi_users` 
                                          ON (`glpi_computers`.`users_id` = `glpi_users`.`id`
                                              ) LEFT JOIN `glpi_ipaddresses`  AS `glpi_ipaddresses_937b8c393ea02752d06397f2628684f5`
                                          ON (`glpi_computers`.`id` = `glpi_ipaddresses_937b8c393ea02752d06397f2628684f5`.`mainitems_id`
                                              AND `glpi_ipaddresses_937b8c393ea02752d06397f2628684f5`.`mainitemtype` = 'Computer'
                                               AND `glpi_ipaddresses_937b8c393ea02752d06397f2628684f5`.`is_deleted` = '0' )  LEFT JOIN `glpi_networkports` 
                                          ON (`glpi_computers`.`id` = `glpi_networkports`.`items_id`
                                              AND `glpi_networkports`.`itemtype` = 'Computer'
                                              )  LEFT JOIN `glpi_items_operatingsystems` 
                                          ON (`glpi_computers`.`id` = `glpi_items_operatingsystems`.`items_id`
                                              AND `glpi_items_operatingsystems`.`itemtype` = 'Computer'
                                              ) LEFT JOIN `glpi_operatingsystems`  AS `glpi_operatingsystems_9719987b154aaf3b42c3db32aef59090`
                                          ON (`glpi_items_operatingsystems`.`operatingsystems_id` = `glpi_operatingsystems_9719987b154aaf3b42c3db32aef59090`.`id`
                                              )LEFT JOIN `glpi_operatingsystemkernelversions`  AS `glpi_operatingsystemkernelversions_9719987b154aaf3b42c3db32aef59090`
                                          ON (`glpi_items_operatingsystems`.`operatingsystemkernelversions_id` = `glpi_operatingsystemkernelversions_9719987b154aaf3b42c3db32aef59090`.`id`
                                              )LEFT JOIN `glpi_operatingsystemkernels`  AS `glpi_operatingsystemkernels_a989ea68abd3f2b55fb5e7d2dcd8477d`
                                          ON (`glpi_operatingsystemkernelversions_9719987b154aaf3b42c3db32aef59090`.`operatingsystemkernels_id` = `glpi_operatingsystemkernels_a989ea68abd3f2b55fb5e7d2dcd8477d`.`id`
                                              ) LEFT JOIN `glpi_networkportwifis`  AS `glpi_networkportwifis_23c902de5f3b180b2aef9e32e62e03a6`
                                             ON (`glpi_networkports`.`id` = `glpi_networkportwifis_23c902de5f3b180b2aef9e32e62e03a6`.`networkports_id`
                                                 )LEFT JOIN `glpi_wifinetworks`  AS `glpi_wifinetworks_29f46d60d7ee1157e60e5048796a9ca8`
                                          ON (`glpi_networkportwifis_23c902de5f3b180b2aef9e32e62e03a6`.`wifinetworks_id` = `glpi_wifinetworks_29f46d60d7ee1157e60e5048796a9ca8`.`id`
                                              ) WHERE  `glpi_computers`.`is_deleted` = 0  AND `glpi_computers`.`is_template` = 0  AND  ( `glpi_computers`.`entities_id` IN ('0')  )  GROUP BY `glpi_computers`.`id` ORDER BY `ITEM_Computer_1` ASC  LIMIT 0, 30;

Page URL

https://inv-test/inv/front/computer.php

Steps To reproduce

  1. Login
  2. Open page Assets > Computers

Your GLPI setup information

Информация о системе, установке и конфигурации
GLPI 10.0.2 (/inv => /var/www/glpi)
Installation mode: TARBALL
Current language:ru_RU

Server
 
Operating system: Linux inv-test 4.15.0-189-generic #200-Ubuntu SMP Wed Jun 22 19:53:37 UTC 2022 x86_64
PHP 8.1.8 apache2handler (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apcu, bz2, calendar,
    ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, json, ldap, libxml,
    mbstring, memcache, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, pspell, readline, session, shmop, sockets, sodium,
    standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="600" memory_limit="1024M" post_max_size="8M" safe_mode="" session.save_handler="files"
    upload_max_filesize="10M" 
Software: Apache/2.4.29 (Ubuntu) (Apache/2.4.29 (Ubuntu) Server at inv-test.pak-cspmz.ru Port 443
)
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.160 YaBrowser/22.5.2.615 Yowser/2.5 Safari/537.36
Server Software: mariadb.org binary distribution
    Server Version: 10.5.16-MariaDB-1:10.5.16+maria~bionic
    Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    Parameters: glpi@localhost/glpi
    Host info: Localhost via UNIX socket

PHP version (8.1.8) is supported.
Sessions configuration is OK.
Allocated memory is sufficient.
mysqli extension is installed.
Following extensions are installed: dom, fileinfo, json, simplexml.
curl extension is installed.
gd extension is installed.
intl extension is installed.
libxml extension is installed.
zlib extension is installed.
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
Database engine version (10.5.16) is supported.
The log file has been created successfully.
Write access to /var/www/glpi/files/_cache has been validated.
Write access to /var/www/glpi/config has been validated.
Write access to /var/www/glpi/files/_cron has been validated.
Write access to /var/www/glpi/files has been validated.
Write access to /var/www/glpi/files/_dumps has been validated.
Write access to /var/www/glpi/files/_graphs has been validated.
Write access to /var/www/glpi/files/_lock has been validated.
Write access to /var/www/glpi/files/_pictures has been validated.
Write access to /var/www/glpi/files/_plugins has been validated.
Write access to /var/www/glpi/files/_rss has been validated.
Write access to /var/www/glpi/files/_sessions has been validated.
Write access to /var/www/glpi/files/_tmp has been validated.
Write access to /var/www/glpi/files/_uploads has been validated.
Web access to the files directory should not be allowed but this cannot be checked automatically on this instance.
Make sure access to error log file (/inv/files/_log/php-errors.log) is forbidden; otherwise review .htaccess file and web server configuration.
exif extension is installed.
ldap extension is installed.
openssl extension is installed.
zip extension is installed.
bz2 extension is installed.
Zend OPcache extension is installed.
Following extensions are installed: ctype, iconv, mbstring, sodium.
Write access to /var/www/glpi/marketplace has been validated.
Timezones seems loaded in database.

GLPI constants
 
GLPI_ROOT: /var/www/glpi
GLPI_CONFIG_DIR: /var/www/glpi/config
GLPI_VAR_DIR: /var/www/glpi/files
GLPI_MARKETPLACE_DIR: /var/www/glpi/marketplace
GLPI_USE_CSRF_CHECK: 1
GLPI_CSRF_EXPIRES: 7200
GLPI_CSRF_MAX_TOKENS: 100
GLPI_USE_IDOR_CHECK: 1
GLPI_IDOR_EXPIRES: 7200
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: 
GLPI_TELEMETRY_URI: https://telemetry.glpi-project.org
GLPI_INSTALL_MODE: TARBALL
GLPI_NETWORK_MAIL: glpi@teclib.com
GLPI_NETWORK_SERVICES: https://services.glpi-network.com
GLPI_MARKETPLACE_ALLOW_OVERRIDE: 1
GLPI_MARKETPLACE_MANUAL_DOWNLOADS: 1
GLPI_USER_AGENT_EXTRA_COMMENTS: 
GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: 1
GLPI_AJAX_DASHBOARD: 1
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_DEMO_MODE: 0
GLPI_CENTRAL_WARNINGS: 1
GLPI_DOC_DIR: /var/www/glpi/files
GLPI_CACHE_DIR: /var/www/glpi/files/_cache
GLPI_CRON_DIR: /var/www/glpi/files/_cron
GLPI_DUMP_DIR: /var/www/glpi/files/_dumps
GLPI_GRAPH_DIR: /var/www/glpi/files/_graphs
GLPI_LOCAL_I18N_DIR: /var/www/glpi/files/_locales
GLPI_LOCK_DIR: /var/www/glpi/files/_lock
GLPI_LOG_DIR: /var/www/glpi/files/_log
GLPI_PICTURE_DIR: /var/www/glpi/files/_pictures
GLPI_PLUGIN_DOC_DIR: /var/www/glpi/files/_plugins
GLPI_RSS_DIR: /var/www/glpi/files/_rss
GLPI_SESSION_DIR: /var/www/glpi/files/_sessions
GLPI_TMP_DIR: /var/www/glpi/files/_tmp
GLPI_UPLOAD_DIR: /var/www/glpi/files/_uploads
GLPI_INVENTORY_DIR: /var/www/glpi/files/_inventories
GLPI_NETWORK_REGISTRATION_API_URL: https://services.glpi-network.com/api/registration/
GLPI_MARKETPLACE_PLUGINS_API_URI: https://services.glpi-network.com/api/glpi-plugins/
GLPI_I18N_DIR: /var/www/glpi/locales
GLPI_VERSION: 10.0.2
GLPI_SCHEMA_VERSION: 10.0.2@a130db99c7d9b131c2e2ea59fe0d6260fe93d831
GLPI_MARKETPLACE_PRERELEASES: 
GLPI_MIN_PHP: 7.4.0
GLPI_MAX_PHP: 8.2.0
GLPI_YEAR: 2022

Libraries
 

Anything else?

No response

github-actions[bot] commented 1 year ago

There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.

If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.

Alwaysin commented 1 year ago

Same here but everything is wayyyy slower on every single page.

f0rextazy commented 1 year ago

If you delete the old page view, it works quickly.

Alwaysin commented 1 year ago

If you delete the old page view, it works quickly.

Can you elaborate on what that means and how to achieve it please?

f0rextazy commented 1 year ago

I have set up a personal display of the columns. personal After the update, the personal settings were saved. You need to delete them and return to the standard page view. standart After creating a new personalized page display. It helped me.

Alwaysin commented 1 year ago

Thank you, I can confirm this seems to work!