-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathschema.json
More file actions
125 lines (125 loc) · 5.13 KB
/
schema.json
File metadata and controls
125 lines (125 loc) · 5.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"$id": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"description": "All the valid configuration parameters for the pool plugin for RoadRunner.",
"title": "roadrunner-pool",
"type": "object",
"additionalProperties": false,
"properties": {
"debug": {
"description": "In debug mode, workers are created immediately before RR passes jobs to them, exiting once the job completes. This defeats the purpose of a worker pool and should only be used during development.",
"type": "boolean",
"default": false
},
"command": {
"type": "string",
"description": "The command to use for the pool. If defined, this will override the value in `server.command` for this pool only.",
"examples": [
"php worker.php"
]
},
"num_workers": {
"description": "The number of worker processes to start. Zero or undefined defaults to the number of logical CPUs.",
"type": "integer",
"minimum": 0,
"default": 0
},
"max_jobs": {
"description": "The maximum number of executions a worker may perform before it is terminated and a new process is started. Zero or undefined means no limit.",
"type": "integer",
"minimum": 0,
"default": 0
},
"max_queue_size": {
"description": "The maximum size of the internal job queue. This is the limit of pending, incoming jobs that await worker allocation. After the limit is reached, all additional jobs will be rejected with an error. Zero or undefined means no limit.",
"type": "integer",
"minimum": 0,
"default": 0
},
"allocate_timeout": {
"description": "The maximum duration an incoming job is allowed to wait for a worker. Zero or undefined defaults to 60s.",
"$ref": "#/$defs/duration",
"default": "60s"
},
"reset_timeout": {
"description": "The maximum duration to wait for the `pool.Reset` operation (`./rr reset`) to complete. Zero or undefined defaults to 60s.",
"$ref": "#/$defs/duration",
"default": "60s"
},
"stream_timeout": {
"description": "The maximum duration to wait for stream cancellation. Zero or undefined defaults to 60s.",
"$ref": "#/$defs/duration",
"default": "60s"
},
"destroy_timeout": {
"description": "The maximum duration to wait for worker termination/deallocation. If a worker has not stopped after this period, the process will be killed. Zero or undefined defaults to 60s.",
"$ref": "#/$defs/duration",
"default": "60s"
},
"dynamic_allocator": {
"title": "Auto-scaling/dynamic Workers",
"description": "Configuration options for auto-scaling/dynamic workers. If not defined, worker auto-scaling is disabled.",
"type": "object",
"additionalProperties": false,
"properties": {
"max_workers": {
"description": "The maximum number of workers that may be dynamically allocated.",
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 10
},
"spawn_rate": {
"description": "The maximum number of workers that may be spawned per NoFreeWorkers error (limited to `max_workers`).",
"type": "integer",
"minimum": 1,
"default": 5
},
"idle_timeout": {
"description": "The duration after which idle dynamically allocated workers will be deallocated.",
"$ref": "#/$defs/duration",
"default": "1m"
}
}
},
"supervisor": {
"title": "Pool Supervisor",
"description": "The pool supervisor is used to control workers. If not defined, the pool has no supervision.",
"type": "object",
"additionalProperties": false,
"properties": {
"watch_tick": {
"description": "Duration between worker state checks. Defaults to 5s.",
"$ref": "#/$defs/duration",
"default": "5s"
},
"ttl": {
"description": "The maximum duration a worker is allowed to live (soft limit). If a worker exceeds this limit while processing a job, it will be terminated afterward. Zero or undefined means no limit.",
"$ref": "#/$defs/duration",
"default": "0s"
},
"idle_ttl": {
"description": "The maximum duration a worker may spend in idle mode after first processing a job (soft limit). If a worker exceeds this value during execution, it will be terminated afterward. Zero or undefined means no limit.",
"$ref": "#/$defs/duration",
"default": "0s"
},
"max_worker_memory": {
"description": "The maximum memory allocation allowed for a worker (soft limit) in MB. If a worker exceeds this value during execution, it will be terminated afterward. This should generally be set to a value lower than your PHP memory_limit, if one is specified. Zero or undefined means no limit.",
"type": "integer",
"minimum": 0,
"default": 0
},
"exec_ttl": {
"description": "The maximum duration any job (hard limit) is allowed to take. If a job exceeds this time limit, the worker processing it will be terminated. Zero or undefined means no limit.",
"$ref": "#/$defs/duration",
"default": "0s"
}
}
}
},
"$defs": {
"duration": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/roadrunner/refs/heads/master/schemas/config/3.0.schema.json#/definitions/Duration"
}
}
}