Skip to content

Commit 9953477

Browse files
authored
fix(core): Align concurrency and timeout defaults between instance and runner (n8n-io#12503)
1 parent 3ea592e commit 9953477

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

packages/@n8n/config/src/configs/runners.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class TaskRunnersConfig {
4242
/**
4343
* How many concurrent tasks can a runner execute at a time
4444
*
45-
* @note Kept high for backwards compatibility - n8n v2 will reduce this to `5`
45+
* Kept high for backwards compatibility - n8n v2 will reduce this to `5`
4646
*/
4747
@Env('N8N_RUNNERS_MAX_CONCURRENCY')
4848
maxConcurrency: number = 10;
@@ -52,7 +52,7 @@ export class TaskRunnersConfig {
5252
* task will be aborted. (In internal mode, the runner will also be
5353
* restarted.) Must be greater than 0.
5454
*
55-
* @note Kept high for backwards compatibility - n8n v2 will reduce this to `60`
55+
* Kept high for backwards compatibility - n8n v2 will reduce this to `60`
5656
*/
5757
@Env('N8N_RUNNERS_TASK_TIMEOUT')
5858
taskTimeout: number = 300; // 5 minutes

packages/@n8n/task-runner/src/config/base-runner-config.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ export class BaseRunnerConfig {
2323
@Env('N8N_RUNNERS_MAX_PAYLOAD')
2424
maxPayloadSize: number = 1024 * 1024 * 1024;
2525

26+
/**
27+
* How many concurrent tasks can a runner execute at a time
28+
*
29+
* Kept high for backwards compatibility - n8n v2 will reduce this to `5`
30+
*/
2631
@Env('N8N_RUNNERS_MAX_CONCURRENCY')
27-
maxConcurrency: number = 5;
32+
maxConcurrency: number = 10;
2833

2934
/**
3035
* How long (in seconds) a runner may be idle for before exit. Intended
@@ -37,8 +42,15 @@ export class BaseRunnerConfig {
3742
@Env('GENERIC_TIMEZONE')
3843
timezone: string = 'America/New_York';
3944

45+
/**
46+
* How long (in seconds) a task is allowed to take for completion, else the
47+
* task will be aborted. (In internal mode, the runner will also be
48+
* restarted.) Must be greater than 0.
49+
*
50+
* Kept high for backwards compatibility - n8n v2 will reduce this to `60`
51+
*/
4052
@Env('N8N_RUNNERS_TASK_TIMEOUT')
41-
taskTimeout: number = 60;
53+
taskTimeout: number = 300; // 5 minutes
4254

4355
@Nested
4456
healthcheckServer!: HealthcheckServerConfig;

0 commit comments

Comments
 (0)