File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1481,8 +1481,12 @@ queries can be executed concurrently.
1481
1481
1482
1482
Defaults to ` 4` .
1483
1483
1484
- This number must be considered in accordance with the database pool size configured in ` database.yml` . The connection pool
1485
- should be large enough to accommodate both the foreground threads (.e.g web server or job worker threads) and background threads.
1484
+ This number must be considered in accordance with the database connection pool size configured in ` database.yml` . The connection pool
1485
+ should be large enough to accommodate both the foreground threads (ie. web server or job worker threads) and background threads.
1486
+
1487
+ For each process, Rails will create one global query executor that uses this many threads to process async queries. Thus , the pool size
1488
+ should be at least ` thread_count + global_executor_concurrency + 1` . For example, if your web server has a maximum of 3 threads,
1489
+ and ` global_executor_concurrency` is set to 4 , then your pool size should be at least 8 .
1486
1490
1487
1491
# ### `config.active_record.allow_deprecated_singular_associations_name`
1488
1492
You can’t perform that action at this time.
0 commit comments