Node-Red Constantly Disabling on VPS: Seeking Solutions for Continuous Operation

I followed Anders Jensen’s tutorial (https://www.youtube.com/watch?v=Zy04eSDy3RI) and implemented the installation of openflow on my VPS server (digital ocean). I also enabled Node-red perfectly.

However, I noticed that node-red is constantly disabled. Is this normal? I saw something about it being turned off every 8 hours, but I thought that wouldn’t happen when the installation was done on my own server.

Either way, I looked for how to purchase the paid plans to avoid this problem and couldn’t find any.

Any advice?

Hey.
Go to Resources and click “Ensure common”.
Reload the website in your browser.
Then go to agents and on each agent, select a “non free” plan for the agent(s) …
image

this will ensure they do not turn off after 8 hours.

Thank you Allan.
I just did that and I believe it solve it.

Well, we will not know until 8 hours have past, but it should fix it :slight_smile:

Allan, I accessed the panel today and this was the state of the agent:

I clicked the play button, and after a while it was up and running. But apparently it was turned off.

Hmm, sounds like a bug … unless you did not turn off the agent before updating ? ( click stop and then start/play )
Lots of questions about this topic, i think there is an issue in my code somewhere ( also mentioned here Parameter "runtime_hours" )

i moved this to issues/bugs …
I think there is a problem here, but need time to do in depth testing

1 Like

both docker and kubernetes had he exact same code

        const resource = await Config.db.GetResource("Agent Instance", parent);
        let runtime: number = resource?.defaultmetadata?.runtime_hours;
        if (NoderedUtil.IsNullUndefinded(runtime)) {
            // If agent resource does not exists, dont turn off agents
            runtime = 0;
            // If agent resource does exists, but have no default, use 24 hours
            if (!NoderedUtil.IsNullUndefinded(resource)) runtime = 24;
        }

it did not care about multi tenancy … guess my memory is not as good as I though.

If no agent resource has been added, or if the resource’s default metadata does not have runtime_hours it will stop all instances after 24 hours.
If it exists, it turn them off after runtime_hours hours.
That is not what I intended. Not sure how that ended up being like that.

So i have changed it to this in 1.5.9.17 … I will make 1.5.9 the latest version this week.

So now the code is

        const resource: any = await Config.db.GetResource("Agent Instance", parent);
        if (NoderedUtil.IsNullUndefinded(resource)) return;
        let runtime: number = resource?.defaultmetadata?.runtime_hours;
        if (NoderedUtil.IsNullUndefinded(runtime)) {
            // If agent resource does not exists, dont turn off agents
            runtime = 0;
        }
        if (runtime < 1) return;

If no agent resource has been added. Do nothing
If agent resource does not have runtime_hours, do nothing
If runtime_hours exists it will turn off the free plan instances after runtime_hours hours.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.