Cardinality drops to 0 (zero) under write load in Version 5.7.19-17

Over the last month we had problems with some Indexes in our PerconaDB (v. 5.7.17). From time to time, the cardinality of all indexes on 2 table are just dropping.
We use

to fix this.

Table 1:

  • around 800k rows
  • created with

Table 2:

  • around 400k rows
  • created with

error.log and general.log/mysql.log does not contain anything suspicious at the specific drop times

This problem is hounting us for weeks now. First we observe an heavy performance drop in the database. After checking the tables, we found the missing cardinalities. This ends up in full table scans for every query.

Attempt 1:
After reading a lot about problems like this in the current version, we decide to upgrade the server to v. 5.7.19-17.
But the problems is still there.

Attempt 2:
Disable all auto reanalyze to test if it kind of a failed background analyze.

But the problems is still there.

Attempt 3:
Disable write on table ‘foooo2’ to check if it just under load
But the problems is still there on ‘foooo1’, but table ‘foooo2’ is working perfectly fine.
So the problem just appears under write load.

If some one could provide additional informations to track that down, I would be very grateful.