processone / processone/ejabberd
Decoding SQL time outs
Nobody has claimed this yet.
- Dominant language
- Erlang
- Stars
- 6.7k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- ejabberd version: 6b0fa44386709151bb48ad9284a060888b7c5c54
- Erlang version: 23.2.6 / Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 11.1.8
- OS: Debian Bullseye arm64
- Installed from: source
- Database: Postgresql 11.12
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the interleaved postgresql.log and ejabberd.log entries from the linked gist, using the provided configuration as context. Run PostgreSQL with log_min_duration_statement set to 250ms and correlate slow statements with ejabberd timeouts. Done means identifying the query or database behavior responsible and documenting a confirmed direction for resolving it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang, postgresql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100