Skip to content

Feature ETP-4296: Add guide for diagnosing idle in transaction connections - #701

Merged
isaiasb-etendo merged 3 commits into
developfrom
feature/ETP-4296
Aug 13, 2026
Merged

Feature ETP-4296: Add guide for diagnosing idle in transaction connections#701
isaiasb-etendo merged 3 commits into
developfrom
feature/ETP-4296

Conversation

@isaiasb-etendo

@isaiasb-etendo isaiasb-etendo commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a new how-to guide (how-to-diagnose-idle-in-transaction-connections.md, EN/ES) covering how to detect, investigate, and mitigate Hibernate/DAL sessions left open outside DalFilter's lifecycle, which PostgreSQL reports as idle in transaction.
  • Expand how-to-use-an-external-connection-pool.md (EN/ES) with the full reference of pool properties and their defaults, since the new guide links to it for pool-level mitigation settings.
  • Register both pages in mkdocs.yml nav (EN/ES), alphabetically ordered.

Related to ETP-4296 — the new guide's diagnostic methodology and fix pattern (closing the session in a finally block with commitAndClose()) directly matches the root cause described in that bug for com.smf.securewebservices.

Test plan

  • mkdocs build --strict passes for the new/updated pages
  • Verified nav entries are alphabetically ordered and match directory structure
  • Verified internal links between the two guides resolve correctly

🤖 Generated with Claude Code

…tions

Add a new how-to guide covering detection, root-cause investigation,
and pool-level mitigation for Hibernate/DAL sessions left open outside
DalFilter's lifecycle, which PostgreSQL reports as idle in transaction.
Expand the external connection pool guide with the full list of pool
properties and defaults referenced by the new guide, and register both
pages in the nav (EN/ES).
@isaiasb-etendo isaiasb-etendo self-assigned this Aug 13, 2026
@isaiasb-etendo
isaiasb-etendo requested a lite review from Copilot August 13, 2026 17:35
@isaiasb-etendo isaiasb-etendo added the bug Something isn't working label Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new troubleshooting how-to guide for identifying and mitigating PostgreSQL idle in transaction connections caused by Hibernate/DAL sessions left open outside DalFilter, and expands the external connection pool guide with a more complete pool-properties reference so the new guide can link to mitigation settings.

Changes:

  • Added new “How to Diagnose Idle in Transaction Connections” guide (EN/ES), including detection SQL, code patterns (commitAndClose() in finally), and pool-level mitigation knobs.
  • Expanded “How to Use an External Connection Pool” (EN/ES) with a detailed property reference, defaults, and sweeper behavior notes.
  • Registered the new guide in mkdocs.yml nav and added its ES title translation mapping.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
mkdocs.yml Adds the new how-to page to the nav and includes the Spanish title translation mapping.
docs/developer-guide/etendo-classic/how-to-guides/how-to-use-an-external-connection-pool.md Expands pool configuration documentation with defaults and a full property reference.
docs/es/developer-guide/etendo-classic/how-to-guides/how-to-use-an-external-connection-pool.md Spanish equivalent of the expanded pool configuration reference.
docs/developer-guide/etendo-classic/how-to-guides/how-to-diagnose-idle-in-transaction-connections.md New EN troubleshooting guide for idle in transaction diagnosis and mitigation.
docs/es/developer-guide/etendo-classic/how-to-guides/how-to-diagnose-idle-in-transaction-connections.md New ES troubleshooting guide for idle in transaction diagnosis and mitigation.
Suppressed comments (2)

docs/developer-guide/etendo-classic/how-to-guides/how-to-use-an-external-connection-pool.md:68

  • The table currently presents db.pool.validationQuery with a single "Default" value, but the correct query is DB-dependent (PostgreSQL vs Oracle). Listing both variants here would prevent readers from assuming the Oracle form works on PostgreSQL.
| `db.pool.validationQuery` | SQL used to validate a connection. Must not throw an exception. Required for `testOnBorrow`, `testOnReturn`, and `testWhileIdle` to have any effect. | `SELECT 1 FROM DUAL` |

docs/es/developer-guide/etendo-classic/how-to-guides/how-to-use-an-external-connection-pool.md:68

  • La tabla muestra db.pool.validationQuery con un único "Valor predeterminado", pero la consulta válida depende de la base de datos (PostgreSQL vs Oracle). Incluir ambas variantes ayuda a evitar asumir que la forma de Oracle funciona en PostgreSQL.
| `db.pool.validationQuery` | SQL utilizada para validar una conexión. No debe lanzar una excepción. Es obligatoria para que `testOnBorrow`, `testOnReturn` y `testWhileIdle` tengan algún efecto. | `SELECT 1 FROM DUAL` |

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Use xact_start instead of query_start in the idle-in-transaction
detection query, since query_start reflects the last statement, not
the open transaction's start. Clarify that the default
db.pool.validationQuery value is Oracle syntax and document the
PostgreSQL equivalent (SELECT 1).
Revert the previous claim that SELECT 1 FROM DUAL needs a
PostgreSQL-specific override. Confirmed against a real PostgreSQL
installation that Etendo's database creation scripts provision a DUAL
compatibility table, so the default query runs unmodified on both
PostgreSQL and Oracle.
@isaiasb-etendo
isaiasb-etendo merged commit 76325d9 into develop Aug 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants