AEM asset API - REST api socket time out exception | Community
Skip to main content
Level 3
July 26, 2023

AEM asset API - REST api socket time out exception

  • July 26, 2023
  • 3 replies
  • 2063 views

Hi All

 

We are using REST API in spring service which in-turn calls aem servlet and this servlet executues Assets API to create asset in AEM. In some cases we create 10-15 assets via Rest API call in loop without any delays. Assets size is just 30KB each.

Sometimes all assets are created successfully but sometimes API request timeouts. We get exception stating socket time out / Read timeout / bad request. And when we check in AEM though we got exception, behind the scene asset got created.

 

And we have set 500 seconds for http connection timeout but still this is occuring.

 

Anyone any idea or any suggestions what to do here?

 

Thank you.

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

3 replies

rawvarun
Community Advisor
Community Advisor
July 26, 2023
Level 2
July 26, 2023

Since there is no error in AEM while uploading assets, i will recommend you increase your API timeout because it looks like your spring service when it calls AEM servlet is timing out and increasing time out or reducing number of assets uploaded in one AEM servlet call are the two options to pursue.

Sachin_Arora_
Community Advisor
Community Advisor
July 27, 2023

Is there any dispatcher in front of AEM when you are trying to hit? It does not seem to be usual that you are getting bad request and AEM is actually receiving the request.

Did you see anything in request.log?

Level 3
August 12, 2023

Yes there is Dispatcher in front of AEM. we have renders defined something like this

/renders
  {
   /hostname "aem.myCompany.com"
   /port "4503"
/timeout "150000"
  }
 
Does time out have will have any impact on API calls to AEM servlets?