Do Runtime actions have max time limit? | Community
Skip to main content
sarav_prakash
Community Advisor
Community Advisor
September 3, 2024
Solved

Do Runtime actions have max time limit?

  • September 3, 2024
  • 1 reply
  • 1164 views

I am writing a runtime webaction that ingests assets into AEM and updates content fragments. 

So I prepared a mock.json with 5000 asset inputs, call the webaction from Postman. This triggers async function that ll read mock.json, and executes for each asset. 

 

I was able to test successfully for ~2000 assets. But observing exactly after 2.5 seconds, the runtime action closes automatically. Node action stops. So the assets waiting after 2.5 seconds, fail to ingest into AEM. 

 

Is there any documentation for max time that runtime actions can stay alive? How to increase? Or we should use whisk alarm and run periodic cron through  non-web action instead of triggering as web action?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by tmj

It is interesting to know the actions fail after 2.5 seconds. @sarav_prakash I'd recommend raising a support ticket to get dedicated help on this.

 

1 reply

tmj
Adobe Employee
Adobe Employee
September 4, 2024

Yes, for blocking calls it is 60 seconds and for async invocation it is up to 1 hour. 

Read our documentation here- https://developer.adobe.com/runtime/docs/guides/using/system_settings/ 

 

Thanks
Manik

 

sarav_prakash
Community Advisor
Community Advisor
September 4, 2024

Thanks @tmj , I am aware of system settings. I tried resetting default settings thru CLI. But its trial-n-error. 

 

Here is my problem.

  1. I have setup event journaling queue and subscribing to events. 
  2. For testing purpose, I mocked the event as json and committed into the action itself
  3. The payload gives a list of assets to get uploaded into AEM
  4. When I run the webaction from postman, action reads mockevent.json, starts ingesting assets into AEM.
  5. The webaction call from postman exits since its async function call.
  6. The async function starts uploading. 
  7. Randomly after ~2.5 secs, the runtime action stops and upload crashes
  8. I want action to stay alive until it fully processed the complete payload.

I even switched to non-webaction and run as whisk alarm trigger (every min). But same problem, action wakes every min, stays alive for ~2-3 secs and dies. Wondering is my design wrong? We shouldn't execute long running tasks through runtime actions?

tmj
Adobe Employee
tmjAdobe EmployeeAccepted solution
Adobe Employee
September 5, 2024

It is interesting to know the actions fail after 2.5 seconds. @sarav_prakash I'd recommend raising a support ticket to get dedicated help on this.