Open JeanBuchweitz opened 1 year ago
Hi
What is the SQL query ? Is it identified as a slow query by the DBMS ?
If this SQL query is responsible of slowness You should impersonate the user loja.38 and check if he uses display preferences to add too many columns.
Also, you need to provide more information to find why the plugin slows down your GLPI. A slow down may occur when users are filling forms (had a feedback some time ago, but an adjustment has been done to limit the impact of such activity).
The user loja.38 has a self-service profile, so many columns cannot be viewed, the error occurs with several users
I believe that the SQL query is made to feed a list of issues. Having no context I'm not sure about that. Check the display preferences of the issues list with a super admin account. If you have many columns added in global display preferences, they also apply to self-service users.
I discovered that what is causing it are the Cards when they are loaded.
When you disable the environment, it becomes normalized.
how many tickets and how many issues do you have in DB ?
around 300 thousand
Describe the bug
plugin generating slowness throughout the GLPI, when I deactivate the Plugin, it normalizes but when active, the bank increases by 600%
GLPI / Plugins (please complete the following information):
Operating system: Linux NGO-GLPI-RH 4.18.0-517.el8.x86_64 #1 SMP Wed Oct 11 00:24:54 UTC 2023 x86_64 PHP 7.4.33 fpm-fcgi (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apcu, bcmath, bz2, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, mysql, mysqli, mysqlnd, newrelic, openssl, pcre, pdo_mysql, pdo_sqlite, posix, session, shmop, sockets, sodium, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib) Setup: max_execution_time="30" memory_limit="128M" post_max_size="20M" safe_mode="" session.save_handler="files" upload_max_filesize="10M" Software: Apache/2.4.37 (CentOS Stream) OpenSSL/1.1.1k () Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0 Server Software: MariaDB Server Server Version: 10.3.28-MariaDB-log Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION Parameters: root@localhost/glpiprod Host info: Localhost via UNIX socket
news Name: Alertas Version: 1.12.1 State: Enabled
Install Method: Marketplace behaviors Name: Comportamentos Version: 2.7.2 State: Enabled
Install Method: Marketplace formcreator Name: Form Creator Version: 2.13.7 State: Enabled
Install Method: Marketplace fusioninventory Name: FusionInventory Version: 9.5+3.0 State: Error / to clean
Install Method: Manual glpiinventory Name: GLPI Inventory Version: 1.3.1 State: Enabled
Install Method: Marketplace datainjection Name: Importação de dados Version: 2.13.3 State: To update
Install Method: Marketplace oauthimap Name: Oauth IMAP Version: 1.4.3 State: Enabled
Install Method: Marketplace dashboard Name: Painel Version: 1.0.2 State: Enabled
Install Method: Manual
Additional context Add any other context about the problem here.
SELECT DISTINCT
glpi_plugin_formcreator_issues
.id
AS id, 'loja.38' AS currentuser,glpi_plugin_formcreator_issues
.itemtype
,glpi_plugin_formcreator_issues
.entities_id
,glpi_plugin_formcreator_issues
.is_recursive
,glpi_plugin_formcreator_issues
.name
ASITEM_PluginFormcreatorIssue_1
,glpi_plugin_formcreator_issues
.id
ASITEM_PluginFormcreatorIssue_1_id
,glpi_plugin_formcreator_issues
.display_id
ASITEM_PluginFormcreatorIssue_1_display_id
,glpi_plugin_formcreator_issues
.display_id
ASITEM_PluginFormcreatorIssue_2
,glpi_plugin_formcreator_issues
.status
ASITEM_PluginFormcreatorIssue_4
,glpi_plugin_formcreator_issues
.date_creation
ASITEM_PluginFormcreatorIssue_5
,glpi_plugin_formcreator_issues
.date_mod
ASITEM_PluginFormcreatorIssue_6
,glpi_entities
.completename
ASITEM_PluginFormcreatorIssue_7
,glpi_users_requester_id
.name
ASITEM_PluginFormcreatorIssue_8
,glpi_users_requester_id
.realname
ASITEM_PluginFormcreatorIssue_8_realname
,glpi_users_requester_id
.id
ASITEM_PluginFormcreatorIssue_8_id
,glpi_users_requester_id
.firstname
ASITEM_PluginFormcreatorIssue_8_firstname
FROMglpi_plugin_formcreator_issues
LEFT JOINglpi_tickets_users
ASglpi_tickets_users_019878060c6d5f06cbe3c4d7c31dec24
ON (glpi_plugin_formcreator_issues
.itemtype
= "Ticket" ANDglpi_plugin_formcreator_issues
.items_id
=glpi_tickets_users_019878060c6d5f06cbe3c4d7c31dec24
.tickets_id
ANDglpi_tickets_users_019878060c6d5f06cbe3c4d7c31dec24
.type
= '1' ) LEFT JOINglpi_tickets_users
ASglpi_tickets_users_9c6b5b644d74a9e8013c7c2ea051dffd
ON (glpi_plugin_formcreator_issues
.itemtype
= "Ticket" ANDglpi_plugin_formcreator_issues
.items_id
=glpi_tickets_users_9c6b5b644d74a9e8013c7c2ea051dffd
.tickets_id
ANDglpi_tickets_users_9c6b5b644d74a9e8013c7c2ea051dffd
.type
= '3' ) LEFT JOINglpi_tickets_users
ASglpi_tickets_users_c6f7f58b9365babf7388e555e526efd5
ON (glpi_plugin_formcreator_issues
.itemtype
= "Ticket" ANDglpi_plugin_formcreator_issues
.items_id
=glpi_tickets_users_c6f7f58b9365babf7388e555e526efd5
.tickets_id
ANDglpi_tickets_users_c6f7f58b9365babf7388e555e526efd5
.type
= '2' ) LEFT JOINglpi_plugin_formcreator_formanswers
ON (glpi_plugin_formcreator_formanswers
.id
=glpi_plugin_formcreator_issues
.items_id
ANDglpi_plugin_formcreator_issues
.itemtype
= 'PluginFormcreatorFormAnswer' ) LEFT JOINglpi_users
ASglpi_users_users_id_validator_7a81b3e711f4a8c5401d6513d495af9a
ON (glpi_plugin_formcreator_formanswers
.users_id_validator
=glpi_users_users_id_validator_7a81b3e711f4a8c5401d6513d495af9a
.id
) LEFT JOINglpi_tickets
ON (glpi_tickets
.id
=glpi_plugin_formcreator_issues
.items_id
ANDglpi_plugin_formcreator_issues
.itemtype
= 'Ticket' ) LEFT JOINglpi_ticketvalidations
ASglpi_ticketvalidations_efead4a1e4d0f1413d363b6502c29dca
ON (glpi_tickets
.id
=glpi_ticketvalidations_efead4a1e4d0f1413d363b6502c29dca
.tickets_id
) LEFT JOINglpi_items_tickets
ASglpi_items_tickets_7a81b3e711f4a8c5401d6513d495af9a
ON (glpi_plugin_formcreator_formanswers
.id
=glpi_items_tickets_7a81b3e711f4a8c5401d6513d495af9a
.items_id
ANDglpi_items_tickets_7a81b3e711f4a8c5401d6513d495af9a
.itemtype
= 'PluginFormcreatorFormAnswer' ) LEFT JOINglpi_tickets
ASglpi_tickets_a0c55e3385abecd4463026b3f3c08a4c
ON (glpi_items_tickets_7a81b3e711f4a8c5401d6513d495af9a
.tickets_id
=glpi_tickets_a0c55e3385abecd4463026b3f3c08a4c
.id
AND 1=1 ) LEFT JOINglpi_ticketvalidations
ASglpi_ticketvalidations_05d82d05a0fafc51c517e6d0a39361b3
ON (glpi_tickets_a0c55e3385abecd4463026b3f3c08a4c
.id
=glpi_ticketvalidations_05d82d05a0fafc51c517e6d0a39361b3
.tickets_id
)LEFT JOINglpi_users
ASglpi_users_users_id_validate_86888b349df83d8c16c11e7624eda9f0
ON (glpi_ticketvalidations_05d82d05a0fafc51c517e6d0a39361b3
.users_id_validate
=glpi_users_users_id_validate_86888b349df83d8c16c11e7624eda9f0
.id
)LEFT JOINglpi_groups
ASglpi_groups_groups_id_validator_7a81b3e711f4a8c5401d6513d495af9a
ON (glpi_plugin_formcreator_formanswers
.groups_id_validator
=glpi_groups_groups_id_validator_7a81b3e711f4a8c5401d6513d495af9a
.id
) LEFT JOINglpi_tickets_users
ASglpi_tickets_users_e45e28bbb3115cbd27d3098703032acf
ON (glpi_tickets_a0c55e3385abecd4463026b3f3c08a4c
.id
=glpi_tickets_users_e45e28bbb3115cbd27d3098703032acf
.tickets_id
ANDglpi_tickets_users_e45e28bbb3115cbd27d3098703032acf
.type
= '1' )LEFT JOINglpi_users
ASglpi_users_af1042e23ce6565cfe58c6db91f84692
ON (glpi_tickets_users_e45e28bbb3115cbd27d3098703032acf
.users_id
=glpi_users_af1042e23ce6565cfe58c6db91f84692
.id
) LEFT JOINglpi_tickets_users
ASglpi_tickets_users_c83744932679a9db8c1b8b21b7b731a7
ON (glpi_tickets_a0c55e3385abecd4463026b3f3c08a4c
.id
=glpi_tickets_users_c83744932679a9db8c1b8b21b7b731a7
.tickets_id
ANDglpi_tickets_users_c83744932679a9db8c1b8b21b7b731a7
.type
= '3' )LEFT JOINglpi_users
ASglpi_users_2d8dddf177c82bdbeae2643568f74658
ON (glpi_tickets_users_c83744932679a9db8c1b8b21b7b731a7
.users_id
=glpi_users_2d8dddf177c82bdbeae2643568f74658
.id
) LEFT JOINglpi_tickets_users
ASglpi_tickets_users_d45e415ad5a902833749797279e16149
ON (glpi_tickets_a0c55e3385abecd4463026b3f3c08a4c
.id
=glpi_tickets_users_d45e415ad5a902833749797279e16149
.tickets_id
ANDglpi_tickets_users_d45e415ad5a902833749797279e16149
.type
= '2' )LEFT JOINglpi_users
ASglpi_users_b1b92f6be5e70531688d870931e94a65
ON (glpi_tickets_users_d45e415ad5a902833749797279e16149
.users_id
=glpi_users_b1b92f6be5e70531688d870931e94a65
.id
)LEFT JOINglpi_entities
ON (glpi_plugin_formcreator_issues
.entities_id
=glpi_entities
.id
)LEFT JOINglpi_users
ASglpi_users_requester_id
ON (glpi_plugin_formcreator_issues
.requester_id
=glpi_users_requester_id
.id
) WHERE ((glpi_tickets_users_019878060c6d5f06cbe3c4d7c31dec24
.users_id = '2066' ORglpi_tickets_users_9c6b5b644d74a9e8013c7c2ea051dffd
.users_id = '2066' ORglpi_plugin_formcreator_issues
.requester_id
= '2066') ORglpi_users_users_id_validator_7a81b3e711f4a8c5401d6513d495af9a
.id
= '2066' ORglpi_users_users_id_validate_86888b349df83d8c16c11e7624eda9f0
.id
= '2066' ORglpi_users_af1042e23ce6565cfe58c6db91f84692
.id
= '2066' ORglpi_users_2d8dddf177c82bdbeae2643568f74658
.id
= '2066' ORglpi_users_b1b92f6be5e70531688d870931e94a65
.id
= '2066' ORglpi_plugin_formcreator_issues
.users_id_recipient
= 2066 ) AND (glpi_plugin_formcreator_issues
.status
IN ('6','103') ) ORDER BYITEM_PluginFormcreatorIssue_1
ASC;