adobe/aio-lib-state

Very long init times on cold start

Closed this issue · 4 comments

While using state in an action to cache a token for reuse, I noticed that initializing the state lib via State.init() sometimes takes a very long time on cold starts.

The time it takes to init ranges from a few seconds up until 30s worst case so far! Following an excerpt of cold start activations that show long init times. Of course, the time it takes for the cold start and some internal operations need to be discounted (~2-3s) but the major part is taken up by State.init().

3/11/2021, 10:28:45 AM 8813561e04bc4ab193561e04bc5ab188 nodejs:12 cold  17717ms  success 
3/11/2021, 9:56:13 AM  0ae59498a806433ca59498a806633c5a nodejs:12 cold  6608ms   success 
3/11/2021, 9:51:50 AM  a520ae8a77f34a77a0ae8a77f33a77d7 nodejs:12 cold  6626ms   success 
3/11/2021, 9:37:50 AM  0579d4b93bd04defb9d4b93bd0fdef72 nodejs:12 cold  1624ms   success 
3/11/2021, 9:11:51 AM  cd5025ec802243e79025ec8022a3e7a5 nodejs:12 cold  2309ms   success 
3/11/2021, 6:44:25 AM  7701ecdf48a24f0981ecdf48a22f0964 nodejs:12 cold  12718ms  success 
3/10/2021, 9:29:09 PM  a0e569d2eb474904a569d2eb47890467 nodejs:12 cold  12416ms  success 

Thanks for reporting the issue @honstar . Currently under investigation as this seems to be recent and not related to any release nor infrastructure change from our side at cloud service level.

Forgot to follow up here: the issue went away the day after where cold start init times went down considerably to reasonable times (2-3s).

Feel free to close this issue for now.

Just realized I closed it myself, might as well :)