I've setup Packetbeat to sniff MySQL traffic. My problem is that for most queries, I get a response of 0 and for some an extremely large value of a few thousands. I've cross checked the lengthy queries with the API requests resulting in the supposedly long queries and they only last a few ms.
In 15 minutes I get:
total requests: ~360.000
responsetime: 0 ~350.000
responsetime: [1 TO *]: ~10.000
responsetime: [1000 TO *]: ~100
On top of that, while trying to debug the issue, I enabled send_response and for most "lengthy" requests, there is no response, although they could be a single one row SELECT statement.
Packetbeat is running on the same server with MySQL (no mirroring, although we've considered it for the future as Packetbeat is resource heavy).
Where can this behavior come from and what can I do to improve the reliability of the logs?