[ZBX-14687] History Syncer Database Deadlock Created: 2018 Aug 06  Updated: 2018 Oct 04  Resolved: 2018 Oct 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 3.4.11
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: James Cook Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Centos 7, Postgres 10, Zabbix 3.4.11


Attachments: Text File Postgres Database Log Examples.txt    

 Description   

Zabbix stopped syncing data and I found log file entries indicating database locks.



 Comments   
Comment by James Cook [ 2018 Aug 06 ]

I have attached some sample logs.

Comment by James Cook [ 2018 Aug 06 ]

If this occurs again the following SQL will be run against the pid locking the database:

    SELECT pid, age(query_start, clock_timestamp()), usename, query

    FROM pg_stat_activity

    WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'

    AND pid = <<<<<INSERT PID HERE>>>>>

    ORDER BY query_start desc;

Comment by Aigars Kadikis [ 2018 Sep 21 ]

Hello, James!

Thank you for the log file. Please include some background information about your environment.

In a normal setup, the database is accessed from two components: back-end and front-end.

Please confirm:

  • database server is dedicated for Zabbix database only
  • only one Zabbix backend is running. no HA setup

P.S. For future debugging we are suggesting to set a different username for the back-end and set a different user for the front-end.

For the clear result, I would like to stop zabbix-server daemon, make sure that all processes are gone "ps aux|grep [z]abbix_server", start the server and replay scenario.

Kind regards,

Comment by Aigars Kadikis [ 2018 Oct 04 ]

Closing the ticket due to lack of activity.

Generated at Sat Dec 13 23:08:49 EET 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.