I have JMX that is traversing around 20000 nodes and runs for ~45 mins.
Locally it runs without error but it fails on testing environment with this error.
"Gateway Timeout
The gateway did not receive a timely response
from the upstream server or application."
Any idea how i can solve this?
Solved! Go to Solution.
Views
Replies
Total Likes
Dear Nadi,
Having to sit on a screen for 45 minutes is not great design of your system. What happens if you machine restarts or you accidentally close the browser window?
Design JMX in a way that you have execute method and status method.
String status(); // tells you the status of the current traversing progress
void start() throws Exception // starts the traversing and returns when successfully started, throws an exception when can't start
void stop() throws Exception; // potentially useful as well in case JMX actually runs for 45 minutes
Anyway, it could be Apache that times out your request, look out for TimeOut setting in your Apache config and increase that value to avoid timeouts.
P.S. it's better to redesign your JMX then bump TimeOut to an hour long value.
Regards,
Peter
Views
Replies
Total Likes
Dear Nadi,
Having to sit on a screen for 45 minutes is not great design of your system. What happens if you machine restarts or you accidentally close the browser window?
Design JMX in a way that you have execute method and status method.
String status(); // tells you the status of the current traversing progress
void start() throws Exception // starts the traversing and returns when successfully started, throws an exception when can't start
void stop() throws Exception; // potentially useful as well in case JMX actually runs for 45 minutes
Anyway, it could be Apache that times out your request, look out for TimeOut setting in your Apache config and increase that value to avoid timeouts.
P.S. it's better to redesign your JMX then bump TimeOut to an hour long value.
Regards,
Peter
Views
Replies
Total Likes
Views
Replies
Total Likes
Your request is taking too long, thus the connection between your client and the server is terminated. And instead of increasing the timeout (which is unlikely to help, because sooner or later you will need to increase it again), you should speed up the processing of the call. Either as suggested (separating the start of the process from getting the result) or speeding up the algorith, Traversing 20k of nodes (assuming TarMK) is a matter of a few seconds, and that shouldn't cause a timeout).
Jörg
Views
Replies
Total Likes
Views
Likes
Replies