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?
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.
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?
Yes there is Dispatcher in front of AEM. we have renders defined something like this