processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6k stars 1.5k forks source link

Decoding SQL time outs #3698

Open licaon-kter opened 2 years ago

licaon-kter commented 2 years ago

Environment

Configuration

https://gist.github.com/licaon-kter/2a7c8f3e08ba8c78e9736eaa0c2dc305

Errors

From postgresql.log and ejabberd.log interleaved, those with ejabberd@ejabberd are from postgresql

https://gist.github.com/licaon-kter/fbb58d32a4231b13f28141f69659bc42

While the device is not crazy fast I keep seeing time outs in ejabberd.log as if Postgresql has issues keeping up with the queries.

As @weiss recommended in the support room, I've setup log_min_duration_statement to 250ms in Postgresql to have it log any slower ones.

badlop commented 1 year ago

What to do with this issue?

licaon-kter commented 1 year ago

Find out why it "times out" for those SQL queries 'Q????????' I guess as those are marked as errors.

Is my db broken? Are the queries broken? etc