Hi ,
I have a service deployed in AEM 6.1 which takes two params. i) fromDate ii) toDate. This services queries repository to find assets modified between fromDate & toDate , do some processing on data and returns xml DOM object as response . I have a JSP page where I am rendering response from this service in data table. If service response data (e.g 50 -200 assets ) then it works fine without any issue. However , if I have more no of data (>1000 assets) and if takes more time to process that data then I am getting 504 Error with following message
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET <Request URL>
Reason: Error reading from remote server
I am not using any proxy server / Web Server . I am hitting request directly to AEM host.
Did anybody faced it before ? any pointers/help would be appreciated?
Solved! Go to Solution.
Views
Replies
Total Likes
You definitly need to fix your code, so it can deal with 1000's of assets (at least). First you should check that your query uses an index at all. If that's still to slow, you should maybe create a dedicated index for that type of query.
Jörg
Hi
It really depends on how much data is returning....
Possible solutions, none of which are likely to make you happy:
Increase timeout value of the proxy (Jitty Time out)
Make your request to a different server (if there's another server with the same data)
Make your request differently (if possible) such that you are requesting less data at a time
Try again once the server is not having issues
~kautuk
Views
Replies
Total Likes
Hi Chandrashekhar,
The java application takes too long to respond(maybe due start-up/jvm being cold) thus you get the proxy error. I could suggest to increase OSGI config jetty service connection timeout.
Also improve your code part. none of the request should take more than 1 min to complete it.
Regards,
Jitendra
Views
Replies
Total Likes
You definitly need to fix your code, so it can deal with 1000's of assets (at least). First you should check that your query uses an index at all. If that's still to slow, you should maybe create a dedicated index for that type of query.
Jörg
Views
Likes
Replies