iachat/config
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
..
environments chore: Disable CORS on public API endpoints (#4970) 2022-07-05 15:00:17 +02:00
initializers chore: Handle APM variables being empty (#6594) 2023-03-02 16:00:16 +05:30
integration feat: Add Google Translate API Integration (#6454) 2023-02-15 20:50:45 -08:00
locales fix: String interpolation (#6635) 2023-03-09 13:50:26 +05:30
webpack feat: Google OAuth for login & signup (#6346) 2023-02-16 11:12:02 +05:30
app.yml Bump version to 2.14.0 2023-02-16 13:41:10 +05:30
application.rb chore: Load only required APMs (#6497) 2023-03-01 14:31:51 +05:30
boot.rb Upgrade to rails 6 💎 (#11) 2019-08-19 13:49:57 +05:30
cable.yml fix: Redis 6 on Heroku breaks ActionCable config (#4269) 2022-03-24 19:25:07 +05:30
database.yml chore: Set statement timeout for Postgres (#6641) 2023-03-13 18:34:18 +05:30
elastic_apm.yml chore: Support for Elastic APM (#5004) 2022-07-22 11:39:37 +02:00
environment.rb Initial Commit 2019-08-14 15:18:44 +05:30
features.yml chore: Cleanup feature flags (#6096) 2022-12-19 22:38:30 +05:30
installation_config.yml chore: Update analytics events (#6050) 2022-12-08 20:53:13 -08:00
newrelic.yml chore: update newrelic gem to support log forwarding (#4626) 2022-05-05 23:57:55 +05:30
puma.rb chore: Fix puma configuration (#5023) 2022-07-12 12:27:33 +02:00
rds-ca-2019-root.pem chore: add aws rds root cert for tls connection (#3812) 2022-02-01 16:01:25 +05:30
routes.rb feat: Audit log APIs (#6434) 2023-03-01 20:02:58 +05:30
schedule.yml chore: Fix the comment in schedule.yml (#6606) 2023-03-03 10:22:25 -08:00
scout_apm.yml chore: Load only required APMs (#6497) 2023-03-01 14:31:51 +05:30
secrets.yml Use secret_key_base from env 2019-08-15 23:08:36 +05:30
sidekiq.yml fix: migration script to run on all reporting events (#6590) 2023-03-02 19:03:31 +05:30
spring.rb 🚨Fix Rubocop lint errors 2019-10-20 14:17:26 +05:30
storage.yml fix: GCS credentials dont need to be parsed as JSON (#1429) 2020-11-27 14:39:25 +05:30
webpacker.yml chore: Suppress the unnecessary CSRF warning (#2606) 2021-07-14 18:40:24 +05:30