Comments (8)
I found the log entries. It does seem to point to the glpi inventory plugin?
/var/www/html/glpi/files/_log/sql-errors.log: SQL: DELETE `glpi_logs` FROM `glpi_logs` WHERE `itemtype` = 'Agent' AND `items_id` = '1051'
/var/www/html/glpi/files/_log/sql-errors.log- Error: Lock wait timeout exceeded; try restarting transaction
/var/www/html/glpi/files/_log/sql-errors.log- Backtrace :
/var/www/html/glpi/files/_log/sql-errors.log- src/DBmysql.php:1579
/var/www/html/glpi/files/_log/sql-errors.log- src/CommonDBTM.php:841 DBmysql->delete()
/var/www/html/glpi/files/_log/sql-errors.log- src/CommonDBTM.php:787 CommonDBTM->cleanHistory()
/var/www/html/glpi/files/_log/sql-errors.log- src/CommonDBTM.php:2068 CommonDBTM->deleteFromDB()
/var/www/html/glpi/files/_log/sql-errors.log- src/CommonDBTM.php:4627 CommonDBTM->delete()
/var/www/html/glpi/files/_log/sql-errors.log- src/Inventory/Asset/MainAsset.php:786 CommonDBTM->deleteByCriteria()
/var/www/html/glpi/files/_log/sql-errors.log- src/RuleImportAsset.php:969 Glpi\Inventory\Asset\MainAsset->rulepassed()
/var/www/html/glpi/files/_log/sql-errors.log- src/Rule.php:1525 RuleImportAsset->executeActions()
/var/www/html/glpi/files/_log/sql-errors.log- src/RuleCollection.php:1640 Rule->process()
/var/www/html/glpi/files/_log/sql-errors.log- src/Inventory/Asset/MainAsset.php:573 RuleCollection->processAllRules()
/var/www/html/glpi/files/_log/sql-errors.log- src/Inventory/Inventory.php:709 Glpi\Inventory\Asset\MainAsset->handle()
/var/www/html/glpi/files/_log/sql-errors.log- src/Inventory/Inventory.php:340 Glpi\Inventory\Inventory->handleItem()
/var/www/html/glpi/files/_log/sql-errors.log- src/Inventory/Request.php:360 Glpi\Inventory\Inventory->doInventory()
/var/www/html/glpi/files/_log/sql-errors.log- src/Inventory/Request.php:90 Glpi\Inventory\Request->inventory()
/var/www/html/glpi/files/_log/sql-errors.log- src/Agent/Communication/AbstractRequest.php:359 Glpi\Inventory\Request->handleAction()
/var/www/html/glpi/files/_log/sql-errors.log- src/Agent/Communication/AbstractRequest.php:271 Glpi\Agent\Communication\AbstractRequest->handleJSONRequest()
/var/www/html/glpi/files/_log/sql-errors.log- front/inventory.php:92 Glpi\Agent\Communication\AbstractRequest->handleRequest()
/var/www/html/glpi/files/_log/sql-errors.log- plugins/glpiinventory/front/communication.php:72 include_once()
/var/www/html/glpi/files/_log/sql-errors.log- plugins/glpiinventory/index.php:45 include_once()
/var/www/html/glpi/files/_log/sql-errors.log- {"user":"[email protected]","mem_usage":"87.900\", 6.13Mio)"}
from glpi.
I traced it to
src/Inventory/Asset/MainAsset.php, part of Glpi proper.
Line 834
//check for any old agent to remove
$agent = new \Agent();
$agent->deleteByCriteria([
'itemtype' => $this->item->getType(),
'items_id' => $items_id,
'NOT' => [
'id' => $this->agent->fields['id']
]
]);
If i comment these lines out, everything returns to normal. Is this section really necessary?
from glpi.
This code deletes the agent from the asset currently being inventoried if it has changed (for example, you switch from Fusion to GLPI-agent).
This will lead to a cascade of database cleanup, particularly in the glpi_logs table, where all entries relating to this itemtype
and item_id
must be deleted.
What does the following SQL query return?
SELECT count(*) FROM `glpi_logs` WHERE `itemtype` = 'Agent' AND `items_id` = '1051'
Best regards
from glpi.
This code deletes the agent from the asset currently being inventoried if it has changed (for example, you switch from Fusion to GLPI-agent).
This will lead to a cascade of database cleanup, particularly in the glpi_logs table, where all entries relating to this
itemtype
anditem_id
must be deleted.What does the following SQL query return?
SELECT count(*) FROM `glpi_logs` WHERE `itemtype` = 'Agent' AND `items_id` = '1051'Best regards
About 50 000 000 lines. Obviously this is our issue here.
Actualy the issue is that this is trigered for hundreds of agents in a few minutes. I let them run in the weekend but none finished even after 12 hours and the server was mostly unresponsive for Web UI management, the logs were full of timed ot transactions.
And we switched to glpi agent a while ago. But only after we rebooted the server this was triggered for some reason.
from glpi.
Are all your tables migrated to using InnoDB instead of MyISAM? There are a lot of performance benefits including smarter locking. With MyISAM, the entire table is locked (made read-only) during a DELETE operation.
from glpi.
Are all your tables migrated to using InnoDB instead of MyISAM? There are a lot of performance benefits including smarter locking. With MyISAM, the entire table is locked (made read-only) during a DELETE operation.
I think so. The logs table definitely is.
from glpi.
Can you view the agent's history with the ID 1051
Do you see anything unusual (an untimely change of linked item, something else)?
from glpi.
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.
from glpi.
Related Issues (20)
- Modification page de connexion HOT 1
- Gradient selector in dashboard widgets seems broken
- Unified Login with Azure AD B2C to Streamline User Authentication and Enhance Security HOT 4
- [main] Twig Error in template "templates/pages/setup/webhook/webhook.html.twig" HOT 1
- GLPI-Agent report data not integrated into GLPI HOT 11
- Regarding Session issue HOT 1
- The cron_mailgate deletes the profile of super-admin from users who have it HOT 4
- Webhooks new form broken HOT 1
- Discourage usage of legacy API HOT 1
- Groups list is bit broken HOT 2
- When ticket created by mailgate, occasionally assigns a already used Ticket ID, and does not actually create ticket or modify the existing one it takes the ID from.
- glpisqllog.WARNING: DBmysql::doQuery() in /var/www/html/glpi/src/DBmysql.php line 443 HOT 1
- Does not send email if it is in the wrong Entity
- "There is no notes on this entity" in ticket right panel
- Unable to login to GLPI HOT 4
- Outlook calendar invites are silently droppend
- No info in asset Phones, but rows in glpi.glpi_phones exists HOT 1
- Webp images support HOT 2
- Error in Updatescript when updating from 10.0.11 to 10.0.16 HOT 2
- Failed to download export Assets and Users HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glpi.