WhatsApp-Business-API-Setup-Scripts
WhatsApp-Business-API-Setup-Scripts copied to clipboard
WA_DB_CONNECTION_IDLE_TIMEOUT postgresql alternative
According to the documentation this env variable is only supported when using MySQL.
WA_DB_CONNECTION_IDLE_TIMEOUT (only supported by MySQL) — By setting this environment variable (in milliseconds) while starting the Coreapp, you can set the idle timeout for your MySQL database. The MySQL server will then close any database connections that are idle for the time set.
There is a similar server side option idle_session_timeout since postgresql 14 but currently you do not support postgresql 14.x.
For now we have set the idle_in_transaction_session_timeout to the value you recommend for WA_DB_CONNECTION_IDLE_TIMEOUT
but sinceidle_in_transaction_session_timeout
is only for transactions it is not equivalent to the behavior of WA_DB_CONNECTION_IDLE_TIMEOUT
with MySQL.
We are currently looking into the following alternatives:
- Using the pgbouncer middleware which has a
server_idle_timeout
option - Using a combination of TCP postgresql settings (tcp_keepalives_idle, tcp_keepalives_interval, tcp_user_timeout) to close idle connections
Do you have any recommendations for an alternative for WA_DB_CONNECTION_IDLE_TIMEOUT
when using postgresql ?
Are there any plans to add support for WA_DB_CONNECTION_IDLE_TIMEOUT
when using postgresql ?
Also are there any plans to support postgresql 14.x in the near future ?
Hi lukas-becker0 (https://github.com/lukas-becker0),
Thank you for your comment. This GitHub repo is not actively monitored. If you need help, please check previously asked questions in the WA Business API Developer Community, or raise a Direct support ticket. Meanwhile, we are happy to continue with less time-sensitive discussions in GitHub.
Thanks for your understanding!