Ad Widget

Collapse

Regular "Temporary tables created per second is high" errors after 6.0 Upgrade.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alexw-z
    Member
    • Dec 2021
    • 36

    #1

    Regular "Temporary tables created per second is high" errors after 6.0 Upgrade.


    Since upgrading Zabbix to 6.0 (and porting the DB from a Ubuntu 14/Maria10.2 box to an Alma 8/Maria10.5 box), my Zabbix server is reporting regular bursts of the following error.

    "MySQL: Number of on-disk temporary tables created per second is high"

    Now and then in conjunction with the following error:

    ​"MySQL: Number of internal temporary tables created per second is high"

    They occur roughly for a minute or two every 1-2 hours, but not at precise intervals, and they don't tie into the time of the Housekeeping process running.

    The box has plenty of spare memory in it's InnoDB buffer cache, and there's no other evidence I can find of swapping to disk occurring. I have doubled the size of the sort_buffer_size twice from the old box as I understand this can be a cause of temporary tables being generated. I believe my sort buffer is still quite small at 8M but my system isn't listing a single sort_merge_pass, so I'm reluctant to keep blindly increasing this value as I understand it can have other knock on effects.

    Zabbix's own documentation helpfully states that I should look for queries in need of optimisation

    Primary keys have also been added to the History tables.

    Can anybody advise if my sort_buffer_size is still too small (we're not a massive install, the box looks after about 1000 hosts), and/or suggest next steps in troubleshooting this error? It's not causing any problems to my knowledge, but it is triggering numerous alerts a day.
    Last edited by alexw-z; 27-03-2023, 19:11.
  • taken
    Junior Member
    • May 2015
    • 15

    #2
    Hey,
    I got exactly this same problem after upgrade from 5.0 LTS to 6.0 LTS - do You find how to resolve this problem?

    Best Regards
    TaKeN
    Last edited by taken; 04-03-2024, 10:31.

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      On disk temp tables appear if your query needs more memory than allowed and will use disk a swap. SO go over the parameters, how much memory your db can use per query etc...
      I do not use mysql and not a DBA, but I remember similar cases with PG and it resolved with increasing some memory parameters...

      Comment

      Working...