# how to enable tablestats=OFF to ON

**URL:** <https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310>\
**Category:** PMM 1.x\
**Created:** [December 21, 2016, 12:14am UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310 "2016-12-21T00:14:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![scar2yjs](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@scar2yjs](https://forums.percona.com/u/scar2yjs)\
**Post date:** [December 21, 2016, 12:14am UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310/1 "2016-12-21T00:14:09Z")

</div>

hello weber,

i wanna know how to how to force enable tablestats=OFF to ON .  
currently i have 1000\* count tables.

---

<div class="post-metadata">

**Author:** ![weber](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@weber](https://forums.percona.com/u/weber)\
**Post date:** [December 21, 2016, 5:47am UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310/2 "2016-12-21T05:47:13Z")

</div>

Hello,

[root@centos7 ~]# pmm-admin add mysql:metrics --help  
…  
–disable-tablestats disable table statistics  
–disable-tablestats-limit uint16 number of tables after which table stats are disabled automatically (default 1000)  
…

So running the command like this will enforce to enable tablestats:  
pmm-admin add mysql:metrics --disable-tablestats-limit 99999 …

---

<div class="post-metadata">

**Author:** ![scar2yjs](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@scar2yjs](https://forums.percona.com/u/scar2yjs)\
**Post date:** [December 23, 2016, 1:31am UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310/3 "2016-12-23T01:31:27Z")

</div>

hello weber,

definitely if there are too many tables 1000+ , increasing cpu load and runtime error: invalid memory, open queries.

pmm-mysql-queries-0.log

2016/12/23 08:14:15.018841 ERROR qan-analyzer-c4996376 qan-analyzer-c4996376-worker crashed: ‘623 2016-12-22 23:12:00 UTC to 2016-12-22 23:13:00 UTC (0-0)’: runtime error: invalid memory address or nil pointer dereference

User ‘pmm’ has exceeded the ‘max\_user\_connections’ resource (current value: 10)

---

<div class="post-metadata">

**Author:** ![scar2yjs](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@scar2yjs](https://forums.percona.com/u/scar2yjs)\
**Post date:** [December 23, 2016, 2:38am UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310/4 "2016-12-23T02:38:08Z")

</div>

additionaly

how can i rearrange Skipping interval ? grafana shows graph lines breaks continuously.

2016/12/23 16:13:00.000936 WARNING qan-analyzer-c8732195 Skipping interval ‘30 2016-12-23 07:12:00 UTC to 2016-12-23 07:13:00 UTC (0-0)’ because interval ‘29 2016-12-23 07:11:00 UTC to 2016-12-23 07:12:00 UTC (0-0)’ is still being parsed  
2016/12/23 16:13:00.000994 WARNING qan-analyzer-f84a508e Skipping interval ‘30 2016-12-23 07:12:00 UTC to 2016-12-23 07:13:00 UTC (0-0)’ because interval ‘29 2016-12-23 07:11:00 UTC to 2016-12-23 07:12:00 UTC (0-0)’ is still being parsed  
2016/12/23 16:14:00.000839 WARNING qan-analyzer-c8732195-worker Interval out of sequence: got 31, expected 30  
2016/12/23 16:14:00.000952 WARNING qan-analyzer-f84a508e-worker Interval out of sequence: got 31, expected 30

---

<div class="post-metadata">

**Author:** ![weber](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@weber](https://forums.percona.com/u/weber)\
**Post date:** [December 23, 2016, 7:42am UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310/5 "2016-12-23T07:42:10Z")

</div>

From most relevant to lower:

- tablestats off
- increase memory limit for Prometheus (see [url][Percona Monitoring and Management](https://www.percona.com/doc/percona-monitoring-and-management/faq.html#how-to-control-memory-consumption-for-prometheus%5B/url%5D)), by default METRICS\_MEMORY is set to 256 Mb. You need to increase it with 3+ clients. Say for 10 clients, it should be at least 2-3 Gb.
- finally, if there is a network latency, you may want to lower metrics resolution from 1s to 5s (METRICS\_RESOLUTION variable).

---

<div class="post-metadata">

**Author:** ![scar2yjs](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@scar2yjs](https://forums.percona.com/u/scar2yjs)\
**Post date:** [December 27, 2016, 11:32pm UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310/6 "2016-12-27T23:32:20Z")

</div>

despite resources increase, skipping interval warning still occur in components such as memory and processors.

prometheus/flags  
storage.local.memory-chunks 6291456

2016/12/28 13:59:00.001678 WARNING qan-analyzer-a34f8701 Skipping interval ‘62 2016-12-28 04:58:00 UTC to 2016-12-28 04:59:00 UTC (0-0)’ because interval ‘61 2016-12-28 04:57:00 UTC to 2016-12-28 04:58:00 UTC (0-0)’ is still being parsed  
2016/12/28 13:59:00.001871 WARNING qan-analyzer-35d40036-worker Interval out of sequence: got 49, expected 48

---

<div class="post-metadata">

**Author:** ![Mykola](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mykola/32/30_2.png) [@Mykola](https://forums.percona.com/u/Mykola)\
**Post date:** [December 28, 2016, 6:07am UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310/7 "2016-12-28T06:07:32Z")

</div>

Hi scar2yjs,

Have you tried to reduce metrics resolution from 1s to 5s (METRICS\_RESOLUTION variable) ?

“Interval out of sequence: got 49, expected 48” it is just warning, it cannot produce any lines breaks in graphs or any bad consequences.

---

<div class="post-metadata">

**Author:** ![scar2yjs](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@scar2yjs](https://forums.percona.com/u/scar2yjs)\
**Post date:** [December 29, 2016, 12:28am UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310/8 "2016-12-29T00:28:04Z")

</div>

hello,

unfortunately skipping interval warning still occur again.

16g mem  
4 cpu  
metrcis 10485760  
resolution:

global: scrape\_interval: 5s scrape\_timeout: 5s evaluation\_interval: 5s  
0 UTC to 2016-12-29 05:52:00 UTC (0-0)’ is still being parsed  
2016/12/29 14:54:00.000958 WARNING qan-analyzer-9723ca8d-worker Interval out of sequence: got 29, expected 28  
2016/12/29 14:55:00.000886 WARNING qan-analyzer-9723ca8d Skipping interval ‘30 2016-12-29 05:54:00 UTC to 2016-12-29 05:55:00 UTC (0-0)’ because interval ‘29 2016-12-29 05:53:00 UTC to 2016-12-29 05:54:00 UTC (0-0)’ is still being parsed

---

<div class="post-metadata">

**Author:** ![Mykola](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mykola/32/30_2.png) [@Mykola](https://forums.percona.com/u/Mykola)\
**Post date:** [December 29, 2016, 4:39am UTC](https://forums.percona.com/t/how-to-enable-tablestats-off-to-on/5310/9 "2016-12-29T04:39:41Z")

</div>

1. I have deeply inspected qan-agent code, I am sure “Skipping interval” errors cannot produce any gaps on grafana graphs.  
Looks like you database server is overloaded (not PMM server).  
Anyway, Why you need to fix these warnings? What bad consequences do you have?

2. To change collect interval in qan-agent from 1 minute to 5 minutes it is needed to login to Percona Query Analytics Web Interface, press “SETTINGS” button and change “Collect interval” value".

![Screenshot 2016-12-29 12.01.33 copy2.png](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/a/a36e42831133eb62a4092cf5df4ec6b270a4786e.jpeg)
