When running the query in the Jaspersoft report studio we are intermittently getting a Bad Gateway error for fetching the data:
Release : Any
Note: this error may happen also if your query isn't optimized. Ensure you tune the queries, remove all joins that are unnecessary and make it as fast as possible. This will avoid this issue from happening