MemoryMbytes
# apify-platform
l
In actor.json you can set:
Copy code
json
{
    "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?
h
Someone will reply to you shortly. In the meantime, this might help: -# This post was marked as solved by Matous. [View answer]().
l
I see that the this setting is under "DefaultRunOptions" which can be changed through the Apify Client API: - https://docs.apify.com/academy/getting-started/apify-client#updating-actor - https://docs.apify.com/api/client/js/reference/interface/ActorDefaultRunOptions 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?
Copy code
javascript
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,
    },
});
a
Hi @louisdck, 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).
l
How do I set the defaults as the creator?
a
a
@apify_matymar just advanced to level 2! Thanks for your contributions! 🎉