[comment]: # ({48f541a4-ee7b9a7e})
# 20 Large JSON value support

[comment]: # ({/48f541a4-ee7b9a7e})

[comment]: # ({339046b2-1557bf10})
To ensure reliable handling of large values with the JSON [data type](/manual/config/items/item#configuration) (1MiB or more), review and apply the following configuration changes as needed:

1\. If you're using MySQL or MariaDB, increase the maximum allowed packet size in `/etc/mysql/my.cnf` (it may default to 1MB on some systems):

```ini
[mysqld]
max_allowed_packet=128M

[mysqldump]
max_allowed_packet=1G
```

2\. Adjust additional MySQL/MariaDB [server system variables](https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html) and [InnoDB system variables](https://dev.mysql.com/doc/refman/8.4/en/innodb-parameters.html) as needed. For example:

```ini
innodb_io_capacity=1900
connect_timeout=600
wait_timeout=57600
interactive_timeout=57600
net_read_timeout=7200
net_write_timeout=7200
net-buffer-length=32704
```

3\. Increase [`HistoryCacheSize`](/manual/appendix/config/zabbix_server#historycachesize) to `2G` in the Zabbix server configuration file.

4\. If you're using Zabbix proxy, increase [`HistoryCacheSize`](/manual/appendix/config/zabbix_proxy#historycachesize) to `2G` and [`ProxyMemoryBufferSize`](/manual/appendix/config/zabbix_proxy#proxymemorybuffersize) to `2G` in the proxy configuration file.

5\. If you're using Zabbix agent, increase communication timeouts between Zabbix server/proxy and agent (e.g., [item timeouts](/manual/config/items/item#item-timeout) or the `Timeout` parameter value in the Zabbix [server](/manual/appendix/config/zabbix_server#timeout)/[proxy](/manual/appendix/config/zabbix_proxy#timeout) and [agent](/manual/appendix/config/zabbix_agentd#timeout) configuration files).
Otherwise, messages between them may not complete, and you may see errors such as *"message length does not match expected length"*.
Also, review other timeouts as needed, such as the [script timeout](/manual/web_interface/frontend_sections/alerts/scripts#script-timeout) or [item test](/manual/web_interface/frontend_sections/administration/general#timeouts) timeout.

[comment]: # ({/339046b2-1557bf10})
