Timeout error occurs after adding the function node in the edge workflow, why?

Hi there
Hope you are well.

I have one problem regarding the function node in the edge workflow.
So, currently my edge workflow is working properly before adding the function node.
I am using the string node to process the string, but as you know, it asks a lot of string nodes to process the complicated string. So I added the function node there, but it throws the timeout error and the whole edge workflow does not work.

So, what is wrong? Can you please help me?

We had another user run into a similar problem last week, and it had to do with his hardware taking too long to spin up the Function Node’s sandbox environment.

There is a workaround: Set the MAX_FLOW_RUN_TIME environment variable to a much higher value, like 300000 (5 minutes). This works because the script to start up the Function Node’s sandbox environment will halt after (MAX_FLOW_RUN_TIME / 4) milliseconds.

We’re investigating this issue more but hopefully that gets you unblocked for now.

Hi @Dylan_Schuster
Thank you for your update.

So, where can I set this environment variable? Can you please let me know in details?

This would go in the script to start the GEA’s Docker container. Something like …

docker run -d --restart always --name docs-agent \
  -e 'DEVICE_ID=<your-device-id>' \
  -e 'ACCESS_KEY=<your-access-key>' \
  -e 'ACCESS_SECRET=<your-access-secret>' \
  -e 'MAX_FLOW_RUN_TIME=300000' \
  -v /var/lib/losant-edge-agent/data:/data \

Thank you for your kind update.
It worked for me.


Hi @Dylan_Schuster
I have one more question, so now it is working properly. But I have found another issue.
So, I am using the run executable node in my edge workflow, by the way, sometimes it does not get the result. And sometimes it gets the command result properly.
I can not understand why.

Can you please help me in terms of this issue?

Sorry, but I need a lot more info before I could be of help with that request. Are there any errors being thrown in the workflow execution? What sort of configuration are you providing to the Run Executable Node - including what exactly you are executing? And whatever the script is, is it possible it could not exit with a status code or it could hang?

I recommend starting a new thread for this request and providing as much information as you can.