You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inventory import fails when a process command line exceeds glpi_items_processes.cmd TEXT limit #25948
During an agent inventory import, GLPI fails with MySQL error 1406 when a reported process command line is longer than the capacity of the database column.
The affected column was confirmed as:
glpi_items_processes.cmd → TEXT → maximum length 65,535
Expected behavior:
GLPI should handle oversized process command lines safely (for example by using a larger column type or by applying a documented truncation policy). A single oversized process command line should not make the inventory import fail.
Actual behavior:
The inventory is reported as an Agent Error and the database insert/update fails.
Relevant log output
MySQL query error:
Data too long for column 'cmd' at row 1 (1406)
Page URL
Not applicable — the error occurs during agent inventory ingestion.
Steps To reproduce
Run GLPI Agent 1.19 on a host that has a process with a command line longer than 65,535 characters/bytes.
Send the computer inventory to GLPI 11.0.7.
GLPI attempts to persist the process command line in glpi_items_processes.cmd.
The inventory fails with MySQL error 1406: Data too long for column 'cmd' at row 1.
Your GLPI setup information
GLPI: 11.0.7
GLPI Agent: 1.19
Database server: MySQL 8.4.9
Verified database schema:
glpi_items_processes.cmd is TEXT with CHARACTER_MAXIMUM_LENGTH = 65535.
This is a production instance. Reproduction with all plugins disabled has not been performed.
Anything else?
The actual process command line, inventory payload, hostnames, IP addresses, domain names, and database identifiers are intentionally omitted because they may contain credentials or internal information.
No exact existing issue was found for this error. The failure appears to be in server-side inventory persistence rather than agent transport.
Hello, I reproduced the bug on 11.0.12 (MariaDB 11.8, Docker, without plugins) by sending a simulated inventory with curl containing a process whose command is 70 000 characters long. I get the same error: Data too long for column 'cmd' at row 1 (1406). With a 10 000 characters long command, the inventory is imported without errors, so the problem comes from the size of the column.
The column glpi_items_processes.cmd is of type text (65 535 bytes). Locally, after ALTER TABLE glpi_items_processes MODIFY cmd longtext;, the inventory with 70 000 characters is imported correctly.
I suggest changing cmd to longtext (as most text columns in GLPI): modification of glpi-empty.sql + new migration (based on update_11.0.2_to_11.0.3/processes.php) + a test in ProcessTest.php. Does this approach suit you, or would you prefer to truncate the command line? If it's OK, I can open a PR on 11.0/bugfixes.
Activity
Maelys711 commentedon Nov 24, 2026
Hello, I reproduced the bug on 11.0.12 (MariaDB 11.8, Docker, without plugins) by sending a simulated inventory with curl containing a process whose command is 70 000 characters long. I get the same error: Data too long for column 'cmd' at row 1 (1406). With a 10 000 characters long command, the inventory is imported without errors, so the problem comes from the size of the column.
The column glpi_items_processes.cmd is of type text (65 535 bytes). Locally, after ALTER TABLE glpi_items_processes MODIFY cmd longtext;, the inventory with 70 000 characters is imported correctly.
I suggest changing cmd to longtext (as most text columns in GLPI): modification of glpi-empty.sql + new migration (based on update_11.0.2_to_11.0.3/processes.php) + a test in ProcessTest.php. Does this approach suit you, or would you prefer to truncate the command line? If it's OK, I can open a PR on 11.0/bugfixes.
MariaDB [glpi]> ALTER TABLE glpi_items_processes MODIFY cmd longtext;
Query OK, 1 row affected (0.097 sec)
$ curl -s -H "Content-Type: application/json" --data @/tmp/inv-long-cmd.json http://localhost:8080/front/inventory.php
{"RESPONSE":"SEND"}
Update processes cmd column to longtext (#26430)