Expand my Community achievements bar.

AEM asset API - REST api socket time out exception

Avatar

Level 4

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.

4 Replies

Avatar

Level 3

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.

Avatar

Community Advisor

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?

Avatar

Level 4

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?