Incorrect default POSTGRES_STATEMENT_TIMEOUT and POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT #19887

Closed
opened 2026-02-21 20:04:48 -05:00 by yindo · 0 comments
Owner

Originally created by @wjunLu on GitHub (Oct 23, 2025).

Originally assigned to: @laipz8200 on GitHub.

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

main

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Issue

When I ran my workflow, I found an interesting error:

Image

while checking the details, I saw nothing failed

Image

However, after many tests, I can summarized a pattern, that is all test cases with each LLM runtime exceeding 60 seconds failed, while those with each LLM completed within 60 seconds were successful.

Image

How to fix

Considering that most LLM operations exceed 60 seconds, I decided to identify the parameters determining this timeout duration and set them to ten times their original values.

Ultimately, I found that two parameters were responsible for the adjustment, i.e., POSTGRES_STATEMENT_TIMEOUT and POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT

So I suggest to change the default POSTGRES_STATEMENT_TIMEOUT and POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT in .env.example to make sure all users can run their tests successfully.

✔️ Expected Behavior

All tests are successful, including the cases with a LLM runtime exceeding 60 seconds, for example

Image

Actual Behavior

All test cases with a runtime exceeding 60 seconds failed.

Originally created by @wjunLu on GitHub (Oct 23, 2025). Originally assigned to: @laipz8200 on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version main ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ### Issue When I ran my workflow, I found an interesting error: <img width="380" height="860" alt="Image" src="https://github.com/user-attachments/assets/103b6b0b-b860-4586-9177-fbcf1bb761cf" /> while checking the details, I saw nothing failed <img width="385" height="777" alt="Image" src="https://github.com/user-attachments/assets/224d7521-f60c-4bb1-bf87-bda59ea0f7ed" /> However, after many tests, I can summarized a pattern, that is all test cases with each LLM runtime exceeding 60 seconds failed, while those with each LLM completed within 60 seconds were successful. <img width="206" height="857" alt="Image" src="https://github.com/user-attachments/assets/0fde7337-30db-4355-8ae0-4dceb863fbc3" /> ### How to fix Considering that most LLM operations exceed 60 seconds, I decided to identify the parameters determining this timeout duration and set them to ten times their original values. Ultimately, I found that two parameters were responsible for the adjustment, i.e., `POSTGRES_STATEMENT_TIMEOUT` and `POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT` So I suggest to change the default `POSTGRES_STATEMENT_TIMEOUT` and `POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT` in `.env.example` to make sure all users can run their tests successfully. ### ✔️ Expected Behavior All tests are successful, including the cases with a LLM runtime exceeding 60 seconds, for example <img width="385" height="299" alt="Image" src="https://github.com/user-attachments/assets/632333cf-bfcb-4534-84da-ce38fa604b05" /> ### ❌ Actual Behavior All test cases with a runtime exceeding 60 seconds failed.
yindo closed this issue 2026-02-21 20:04:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#19887