Expand my Community achievements bar.

SOLVED

Do Runtime actions have max time limit?

Avatar

Level 5

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?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

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.

 

View solution in original post

3 Replies

Avatar

Employee
Employee

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

 

Avatar

Level 5

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?

Avatar

Correct answer by
Employee

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.