chatwoot/deployment
Sojan Jose 7cbf1857e4
chore: Set statement timeout for Postgres (#6641)
By default, Rails does not set a timeout on database statements. For example, this will run for a full day, even if your ruby process goes away. But it's configurable in the database.yml with the statement_timeout variable.

Hence we are enforcing a 14s timeout by default. Migration commands inside chatwoot will run with a 10 minutes timeout. For specific cases like migrations, we can override this timeout using the environment variable POSTGRES_STATEMENT_TIMEOUT while starting a new rails console.

Test the timeouts from the rails console using.

```
ActiveRecord::Base.connection.execute("SELECT pg_sleep(15);")
```

ref: https://github.com/ankane/the-ultimate-guide-to-ruby-timeouts#postgresql
ref: https://til.hashrocket.com/posts/b44baf657d-railspg-statement-timeout-
2023-03-13 18:34:18 +05:30
..
chatwoot feat: add chatwoot ctl(cwctl) cli tool (#4836) 2022-06-22 23:39:01 +05:30
chatwoot-web.1.service chore: upgrade ruby to 3.1.3 (#5555) 2023-01-24 23:55:07 +05:30
chatwoot-worker.1.service chore: upgrade ruby to 3.1.3 (#5555) 2023-01-24 23:55:07 +05:30
chatwoot.target Feature: Add installation script (#776) 2020-05-05 01:59:38 +05:30
nginx_chatwoot.conf chore: Improve Nginx settings for speed and security (#5144) 2022-10-03 17:43:50 +05:30
setup_18.04.sh chore: Update ruby and docker base image to 3.0.4 (#4693) 2022-05-27 17:33:24 +05:30
setup_20.04.sh chore: Set statement timeout for Postgres (#6641) 2023-03-13 18:34:18 +05:30