# The "max-query-length" parameter is not effective

**URL:** <https://forums.percona.com/t/the-max-query-length-parameter-is-not-effective/30169>\
**Category:** PMM 2.x\
**Tags:** pmm\
**Created:** [May 9, 2024, 6:59am UTC](https://forums.percona.com/t/the-max-query-length-parameter-is-not-effective/30169 "2024-05-09T06:59:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wayne1](https://avatars.discourse-cdn.com/v4/letter/w/e99b99/32.png) [@wayne1](https://forums.percona.com/u/wayne1)\
**Post date:** [May 9, 2024, 6:59am UTC](https://forums.percona.com/t/the-max-query-length-parameter-is-not-effective/30169/1 "2024-05-09T06:59:59Z")

</div>

## Description:

Hi, I faced an error called “EXPLAIN failed because the query was too long and trimmed. Set max-query-length to a larger value.” while i was used PMM QAN/explain on MySQL long-length query.  
After that, I re-added the MySQL node and set “max-query-length” to “-1”, but the error still came up.

Looking forward for your reply, thanks!

 ![Snipaste_2024-05-09_14-43-30](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/b/1/b1d9db5ba58c700c29fbc00901cd2d50d9916d66.png)

## Steps to Reproduce:

1. Add a new MySQL node called “prod2” and set “max-query-length” to “-1” .
2. Remove old MySQL node called “prod”

## Version:

PMM Version: 2.41.2  
MySQL Version: 8.0.26

## Expected Result:

Expected the Result of PMM QAN/explain with long-length query work well.

---

<div class="post-metadata">

**Author:** ![Roma\_Novikov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/roma_novikov/32/1161_2.png) [@Roma\_Novikov](https://forums.percona.com/u/Roma_Novikov)\
**Post date:** [May 9, 2024, 1:45pm UTC](https://forums.percona.com/t/the-max-query-length-parameter-is-not-effective/30169/2 "2024-05-09T13:45:22Z")

</div>

@wayne1 , this sounds like a bug.  
Can you report a bug in our Jira at [https://perconadev.atlassian.net/](https://perconadev.atlassian.net/) so we can reproduce it?  
It will be good to have also an example of the query you had here and the client version (if it’s not the same as the server )

---

<div class="post-metadata">

**Author:** ![nurlan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nurlan/32/1523_2.png) [@nurlan](https://forums.percona.com/u/nurlan)\
**Post date:** [May 9, 2024, 9:29pm UTC](https://forums.percona.com/t/the-max-query-length-parameter-is-not-effective/30169/3 "2024-05-09T21:29:17Z")

</div>

Hello, what data source was used? if it’s performance schema, there is also variable that should be updated on DB side `performance_schema_max_digest_length` [https://dev.mysql.com/doc/refman/8.0/en/performance-schema-system-variables.html](https://dev.mysql.com/doc/refman/8.0/en/performance-schema-system-variables.html)
