Skip to content

Commit e4747ee

Browse files
Add note that container's max_instances are not enforced locally (#23863)
* fix typos in wrangler config doc * add note about max_instances not being enforced locally * add note about `max_instances` in local dev docs * Update src/content/docs/containers/local-dev.mdx * Update src/content/docs/workers/wrangler/configuration.mdx --------- Co-authored-by: Jun Lee <[email protected]>
1 parent 37fa663 commit e4747ee

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/content/docs/containers/local-dev.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ If your Worker app creates many container instances, your local machine may not
3030

3131
Additionally, if you regularly rebuild containers locally, you may want to clear
3232
out old container images (using `docker image prune` or similar) to reduce disk used.
33+
34+
Also note that the `max_instances` configuration option is only enforced when running in production on Cloudflare's network. This limit does not apply during local development, so you may run more instances than specified.
3335
:::
3436

3537
## Iterating on Container code

src/content/docs/workers/wrangler/configuration.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,13 +1094,15 @@ The following options are available:
10941094

10951095
- `max_instances` <Type text="string" /> <MetaInfo text="optional" />
10961096

1097-
- The maxiumum number of concurrent container instances you want to run. If you have more Durable Objects that
1097+
- The maximum number of concurrent container instances you want to run. If you have more Durable Objects that
10981098
request to run a container than this number, the container request will error. You may have more Durable Objects
10991099
than this number over a longer time period, but you may not have more concurrently.
11001100

1101+
- This value is only enforced when running in production on Cloudflare's network. This limit does not apply during local development, so you may run more instances than specified.
1102+
11011103
- `name` <Type text="string" /> <MetaInfo text="optional" />
11021104

1103-
- The name of your container. Used as an identifier. This will default to a comination of your Worker name, the class
1105+
- The name of your container. Used as an identifier. This will default to a combination of your Worker name, the class
11041106
name, and your environment.
11051107

11061108
- `image_build_context` <Type text="string" /> <MetaInfo text="optional" />
@@ -1224,7 +1226,7 @@ You can configure various aspects of local development, such as the local protoc
12241226

12251227
- `enable_containers` <Type text="boolean" /> <MetaInfo text="optional" />
12261228

1227-
- Determines whether to enable containers during a local dev session, if they have been configured. Defaults to `true`. If set to `false`, you can develop the rest of your application without requiring Docker or other container tool, as long as you do not invoke any code that interacts with containers.
1229+
- Determines whether to enable containers during a local dev session, if they have been configured. Defaults to `true`. If set to `false`, you can develop the rest of your application without requiring Docker or other container tool, as long as you do not invoke any code that interacts with containers.
12281230

12291231
- `container_engine` <Type text="string" /> <MetaInfo text="optional" />
12301232

@@ -1292,12 +1294,12 @@ You can alias all imports of `node-fetch` to instead point directly to the `fetc
12921294

12931295
```toml title="wrangler.toml"
12941296
[alias]
1295-
"node-fetch" = "./fetch-nolyfill"
1297+
"node-fetch" = "./fetch-polyfill"
12961298
```
12971299

12981300
</WranglerConfig>
12991301

1300-
```js title="./fetch-nolyfill"
1302+
```js title="./fetch-polyfill"
13011303
export default fetch;
13021304
```
13031305

0 commit comments

Comments
 (0)