Skip to content

Commit

Permalink
Expand on global_executor_concurrency docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiculescu committed Jan 9, 2024
1 parent 0d940e3 commit b7a9463
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions guides/source/configuring.md
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,12 @@ queries can be executed concurrently.

Defaults to `4`.

This number must be considered in accordance with the database pool size configured in `database.yml`. The connection pool
should be large enough to accommodate both the foreground threads (.e.g web server or job worker threads) and background threads.
This number must be considered in accordance with the database connection pool size configured in `database.yml`. The connection pool
should be large enough to accommodate both the foreground threads (ie. web server or job worker threads) and background threads.

For each process, Rails will create one global query executor that uses this many threads to process async queries. Thus, the pool size
should be at least `thread_count + 1 + global_executor_concurrency`. For example, if your web server has a maximum of 3 threads,
and `global_executor_concurrency` is set to 4, then your pool size should be at least 8.

#### `config.active_record.allow_deprecated_singular_associations_name`

Expand Down

0 comments on commit b7a9463

Please sign in to comment.