Hi,
Every AEM function which reaches out to an external system should be guarded by a timeout, and in most cases a timeout of more than 30 seconds is inadequate and too high; what's the functionality on the other system which takes 30 seconds to response properly?
This gets even more important, if an user makes a request to AEM and AEM in turn makes a request to a different system. The AEM standard timeout is 30 second (which is quite high for an interactive application), so the application on the other system should also respond very quickly, thus a timeout of say 5 seconds is appropriate. Relying on default timeouts is a good way to run a Denial of Service attack against AEM, because if all threads are blocked (waiting on the external system which response very slowly) your AEM doesn't have free threads anymore to handle legitimate requests (which do not require to reach this other system and which could be handled within milliseconds).
So: Do not increase the timeout on AEM side, but rather build your application in a more resilient way.
Ok, understood. But that means that you reconfigure AEM explicitly for this request.
The timeout configuration is a safety measure of every system, which allows it to recover from operations which take too long. If you increase the overall timeout, the loosen this safety net a bit.
In your case you have 2 timeouts to consider:
* The timeout of jetty (the request from user to AEM)
* the timeout of your external request (from AEM to the external system)
You have to increase the timeout of both.