#MemoryMbytes

1 messages · Page 1 of 1 (latest)

quartz atlas
#

In actor.json you can set:

{
    "minMemoryMbytes": 128,
    "maxMemoryMbytes": 256,
}

However, this does not change the default, which is 4096MB. When the user first opens the actor and wants to run he will get this message: "You've set memory higher than the maximum of 256MB allowed for this Actor.". While it's not super hard for the user to change this, it would be more user friendly if the suggested default amount falls within the accepted range. Is this something we can change as a developer?

carmine sequoia
#

Someone will reply to you shortly. In the meantime, this might help:

-# This post was marked as solved by Matous. View answer.

quartz atlas
#

I see that the this setting is under "DefaultRunOptions" which can be changed through the Apify Client API:

As far as I understand, this is something that gets changed by the end user, not the actor developer? Is it also possible for the developer to set an initial default?

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({
    token: 'YOUR_TOKEN',
});

const actor = client.actor('YOUR_USERNAME/adding-actor');

await actor.update({
    defaultRunOptions: {
        build: 'latest',
        memoryMbytes: 256,
        timeoutSecs: 20,
    },
});

Interact with the Apify API in your code by using the apify-client package, which is available for both JavaScript and Python.

covert rune
#

Hi @quartz atlas,
as far as I am concerned, there is no such option (I believe the reason for this is to make developers think about what values they really want to use to prevent some undesirable behavior or credit losses).

On the other hand, if you create an actor, set the defaults and publish it, the public actor will have the defaults you specified (so the user shouldn't ever run into above mentioned message, unless a) developer set their Actor wrong b) user changes something).

quartz atlas
covert rune