Timeout error for JMX

Avatar

Avatar
Validate 1
Level 1
nadicaj14562681
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
nadicaj14562681
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
nadicaj14562681
Level 1

07-04-2020

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?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

140 likes

Total Posts

543 posts

Correct reply

165 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

140 likes

Total Posts

543 posts

Correct reply

165 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile
PuzanovsP
MVP

07-04-2020

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

Answers (1)

Answers (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

07-04-2020

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