View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 20514 | Bug reports | Survey taking | public | 2026-05-13 13:25 | 2026-05-26 22:49 |
| Reporter | hinghang | Assigned To | c_schmitz | ||
| Priority | none | Severity | minor | ||
| Status | closed | Resolution | no change required | ||
| Product Version | 6.14.x | ||||
| Summary | 20514: Intermittent currval of sequence is not yet defined error during survey response submission on Patroni PostgreSQL cluster | ||||
| Description | When end-users attempt to submit survey responses, LimeSurvey intermittently fails and throws the following database exception: currval of sequence "limesurvey[SURVEY_ID]_id_seq" is not yet defined in this session The issue occurs in bursts affecting a subset of users during a specific period. After a period of time, the issue resolves itself automatically without requiring a manual database or application restart. | ||||
| Steps To Reproduce | Steps to reproduce(Replace this text with detailed step-by-step instructions on how to reproduce the issue) Expected result(Write here what you expected to happen) Actual result(Write here what happened instead) | ||||
| Tags | No tags attached. | ||||
| Bug heat | 2 | ||||
| Complete LimeSurvey version number (& build) | 6.14.0+250520 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | |||||
| Database type & version | PostgreSQL 16.6 with Patroni 4.0.4 | ||||
| Server OS (if known) | |||||
| Webserver software & version (if known) | |||||
| PHP Version | 8.3.22 | ||||
| Git branch / Pull Request URL | |||||
|
Closing — this is an infrastructure issue, not a LimeSurvey bug. The "currval of sequence is not yet defined in this session" error occurs when PostgreSQL session state is lost mid-operation. This happens in Patroni clusters due to connection pooling (e.g., PgBouncer in transaction/statement mode) or primary failover events - both of which reset session-level sequence state. LimeSurvey uses standard INSERT + lastInsertID(), which is correct per PostgreSQL semantics. The fix is in your infrastructure: use session-mode pooling, or check Patroni logs for failovers correlating with the error bursts. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-05-13 13:25 | hinghang | New Issue | |
| 2026-05-26 22:49 | c_schmitz | Assigned To | => c_schmitz |
| 2026-05-26 22:49 | c_schmitz | Status | new => closed |
| 2026-05-26 22:49 | c_schmitz | Resolution | open => no change required |
| 2026-05-26 22:49 | c_schmitz | Note Added: 84914 | |
| 2026-05-26 22:49 | c_schmitz | Bug heat | 0 => 2 |