Skip to content

Commit 32b7262

Browse files
authored
feat: Adding info that memory must be set to a power of 2 (#407)
* feat: Adding info that memory must be set to a power of 2 * Update running.md
1 parent ff67d21 commit 32b7262

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

content/docs/actors/running.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ Internally, the `call()` function takes the user's API token from the `APIFY_TOK
7575

7676
## Resource limits
7777

78-
Actors run inside a Docker container whose resources are limited. When invoking the actor, the caller has to specify the amount of memory allocated for the actor. Additionally, each user has a certain total limit of memory for running actors. The sum of memory allocated for all running actors and builds needs to fit into this limit, otherwise the user cannot start a new actor. For more details, see [Limits]({{@link actors/limits.md}}).
78+
Actors run inside a Docker container whose resources are limited. When invoking the actor, the caller has to specify the amount of memory allocated for the actor. The amount of memory can be set to a power of 2 with a minimum of 128 MB, i.e., 256 MB, 512 MB, 1024 MB, 2048 MB, ..., 32768 MB.
79+
80+
Additionally, each user has a certain total limit of memory for running actors. The sum of memory allocated for all running actors and builds needs to fit into this limit, otherwise the user cannot start a new actor. For more details, see [Limits]({{@link actors/limits.md}}).
7981

8082
The share of CPU is computed automatically from the memory as follows: for each 4096 MB of memory, the actor gets 1 full CPU core. For other amounts of memory the number of CPU cores is computed fractionally. For example, an actor with 1024 MB of memory will have a 1/4 share of a CPU core.
8183

content/docs/api_v2/api_v2_reference.apib

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ received in the response JSON to the [Get items](#reference/datasets/item-collec
945945

946946
+ token: `rWLaYmvZeK55uatRrZib4xbZs` (string, optional) - API authentication token. Public actors that are configured to be anonymously runnable do not require the token.
947947
+ timeout: 60 (number, optional) - Optional timeout for the run, in seconds. By default, the run uses a timeout specified in the default run configuration for the actor.
948-
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the default run configuration for the actor.
948+
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. The amount of memory can be set to a power of 2 with a minimum of 128. By default, the run uses a memory limit specified in the default run configuration for the actor.
949949
+ build: `0.1.234` (string, optional) - Specifies the actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the default run configuration for the actor (typically `latest`).
950950
+ waitForFinish: 60 (number, optional) - The maximum number of seconds the server waits for the run to finish. By default, it is `0`, the maximum value is `300`. <!-- MAX_ACTOR_JOB_SYNC_WAIT_SECS -->
951951
If the build finishes in time then the returned run object will have a terminal status (e.g. `SUCCEEDED`),
@@ -981,7 +981,7 @@ received in the response JSON to the [Get items](#reference/datasets/item-collec
981981
+ outputRecordKey: `OUTPUT` (string, optional) - Key of the record from run's default key-value store to be returned
982982
in the response. By default, it is `OUTPUT`.
983983
+ timeout: 60 (number, optional) - Optional timeout for the run, in seconds. By default, the run uses a timeout specified in the default run configuration for the actor.
984-
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the default run configuration for the actor.
984+
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. The amount of memory can be set to a power of 2 with a minimum of 128. By default, the run uses a memory limit specified in the default run configuration for the actor.
985985
+ build: `0.1.234` (string, optional) - Specifies the actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the default run configuration for the actor (typically `latest`).
986986
+ webhooks: `dGhpcyBpcyBqdXN0IGV4YW1wbGUK...` (string, optional) - Specifies optional webhooks associated with the actor run, which can be used to receive a notification
987987
e.g. when the actor finished or failed. The value is a Base64-encoded JSON array of objects defining the webhooks. For more information, see
@@ -1098,7 +1098,7 @@ To run the actor asynchronously, use the [Run actor](#reference/actors/run-colle
10981098
+ actorId: `janedoe~my-actor` (string, required) - Actor ID or a tilde-separated owner's username and actor name.
10991099
+ token: `rWLaYmvZeK55uatRrZib4xbZs` (string, optional) - API authentication token. Public actors that are configured to be anonymously runnable do not require token parameter.
11001100
+ timeout: 60 (number, optional) - Optional timeout for the run, in seconds. By default, the run uses a timeout specified in the default run configuration for the actor.
1101-
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the default run configuration for the actor.
1101+
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. The amount of memory can be set to a power of 2 with a minimum of 128. By default, the run uses a memory limit specified in the default run configuration for the actor.
11021102
+ build: `0.1.234` (string, optional) - Specifies the actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the default run configuration for the actor (typically `latest`).
11031103
+ webhooks: `dGhpcyBpcyBqdXN0IGV4YW1wbGUK...` (string, optional) - Specifies optional webhooks associated with the actor run, which can be used to receive a notification
11041104
e.g. when the actor finished or failed. The value is a Base64-encoded JSON array of objects defining the webhooks. For more information, see
@@ -1364,7 +1364,7 @@ For more information, see [Actor docs](https://docs.apify.com/actor/run#resurrec
13641364
+ token: `rWLaYmvZeK55uatRrZib4xbZs` (string, required) - API authentication token.
13651365
+ build: `0.1.234` (string, optional) - Specifies the actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the run that is being resurrected (typically `latest`).
13661366
+ timeout: 60 (number, optional) - Optional timeout for the run, in seconds. By default, the run uses a timeout specified in the run that is being resurrected.
1367-
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the run that is being resurrected.
1367+
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. The amount of memory can be set to a power of 2 with a minimum of 128. By default, the run uses a memory limit specified in the run that is being resurrected.
13681368

13691369
+ Response 200 (application/json)
13701370

@@ -1691,7 +1691,7 @@ received in the response JSON to the [Get items](#reference/datasets/item-collec
16911691
+ actorTaskId: `janedoe~my-task` (string, required) - Task ID or a tilde-separated owner's username and task's name.
16921692
+ token: `rWLaYmvZeK55uatRrZib4xbZs` (string, optional) - API authentication token.
16931693
+ timeout: 60 (number, optional) - Optional timeout for the run, in seconds. By default, the run uses a timeout specified in the task settings.
1694-
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the task settings.
1694+
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. The amount of memory can be set to a power of 2 with a minimum of 128. By default, the run uses a memory limit specified in the task settings.
16951695
+ build: `0.1.234` (string, optional) - Specifies the actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the task settings (typically `latest`).
16961696
+ waitForFinish: 60 (number, optional) - The maximum number of seconds the server waits for the run to finish. By default, it is `0`, the maximum value is `300`. <!-- MAX_ACTOR_JOB_SYNC_WAIT_SECS -->
16971697
If the build finishes in time then the returned run object will have a terminal status (e.g. `SUCCEEDED`),
@@ -1727,7 +1727,7 @@ received in the response JSON to the [Get items](#reference/datasets/item-collec
17271727
+ actorTaskId: `janedoe~my-task` (string, required) - Task ID or a tilde-separated owner's username and task's name.
17281728
+ token: `rWLaYmvZeK55uatRrZib4xbZs` (string, optional) - API authentication token.
17291729
+ timeout: 60 (number, optional) - Optional timeout for the run, in seconds. By default, the run uses a timeout specified in the task settings.
1730-
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the task settings.
1730+
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. The amount of memory can be set to a power of 2 with a minimum of 128. By default, the run uses a memory limit specified in the task settings.
17311731
+ build: `0.1.234` (string, optional) - Specifies the actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the task settings (typically `latest`).
17321732
+ outputRecordKey: `OUTPUT` (string, optional) - Key of the record from run's default key-value store to be returned
17331733
in the response. By default, it is `OUTPUT`.
@@ -1834,7 +1834,7 @@ To run the Task asynchronously, use the [Run task asynchronously](#reference/act
18341834
+ actorTaskId: `janedoe~my-task` (string, required) - Task ID or a tilde-separated owner's username and task's name.
18351835
+ token: `rWLaYmvZeK55uatRrZib4xbZs` (string, optional) - API authentication token.
18361836
+ timeout: 60 (number, optional) - Optional timeout for the run, in seconds. By default, the run uses a timeout specified in the task settings.
1837-
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the task settings.
1837+
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. The amount of memory can be set to a power of 2 with a minimum of 128. By default, the run uses a memory limit specified in the task settings.
18381838
+ build: `0.1.234` (string, optional) - Specifies the actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the task settings (typically `latest`).
18391839
+ webhooks: `dGhpcyBpcyBqdXN0IGV4YW1wbGUK...` (string, optional) - Specifies optional webhooks associated with the actor run, which can be used to receive a notification
18401840
e.g. when the actor finished or failed. The value is a Base64-encoded JSON array of objects defining the webhooks. For more information, see
@@ -2247,7 +2247,7 @@ For more information, see [Actor docs](https://docs.apify.com/actor/run#resurrec
22472247
+ token: `rWLaYmvZeK55uatRrZib4xbZs` (string, required) - API authentication token.
22482248
+ build: `0.1.234` (string, optional) - Specifies the actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the run that is being resurrected (typically `latest`).
22492249
+ timeout: 60 (number, optional) - Optional timeout for the run, in seconds. By default, the run uses a timeout specified in the run that is being resurrected.
2250-
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the run that is being resurrected.
2250+
+ memory: 256 (number, optional) - Memory limit for the run, in megabytes. The amount of memory can be set to a power of 2 with a minimum of 128. By default, the run uses a memory limit specified in the run that is being resurrected.
22512251

22522252
+ Response 200 (application/json)
22532253

0 commit comments

Comments
 (0)