At some point proxy's mysql db size started to grow very quickly. There were no changes on zabbix's side, and there were no issues in communication between proxy and server. After some digging I found that few records in proxy_history table had wrong (up to 1 day behind) timestamp in clock field.
By such records I found monitored host with wrong clock settings.
Steps to reproduce:
proxy, HousekeepingFrequency=1, housekeep will remove up to 4 hours of old history, starting from oldest record (select min(clock) from proxy_history).
Setup monitoring for few hosts with correct time settings and 1 host with wrong time settings (-1 day, for example).
Collect some metrics for 1+ hour.
Wait for housekeeper execute of trigger it manually.
Observe housekeeper to delete records from problem hosts since they are "oldest" by clock field. Records from other hosts with correct time settings still will be there.
Collected metrics stored in proxy_history with monitored hosts' time in clock field. db size will grow up since cleanup of most records will be delayed with time lag of problem host.
Example. Normal housekeeper run:
Housekeep run after time changed on one monitored host:
Monitored hosts cannot break server-side logic.
PS. Didn't checked if server's housekeeper also affected.
PPS. Caught on 5.2.5, but latest 6.0.4 also affected, if I understood source code correctly.