504(Gateway Time-out) on GET request
up vote
0
down vote
favorite
I'm using Java, to execute GET request with HttpURLConnection to our server. (Timeout is infinity)
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setConnectTimeout(0);
con.setReadTimeout(0);
The server configured as spring Controller and access the MySQL DB and run some queries.
In some of the cases, if the call takes 50 seconds, I get 504(Gateway Time-out) response from the server,
and in the server, there is an exception:
"org.apache.catalina.connector.ClientAbortException: null .... Caused by: java.net.SocketException: Connection reset"
What is the reason for the timeout?
It's in the Server side? or on the client side?
Thanks.
spring rest spring-mvc model-view-controller controller
New contributor
add a comment |
up vote
0
down vote
favorite
I'm using Java, to execute GET request with HttpURLConnection to our server. (Timeout is infinity)
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setConnectTimeout(0);
con.setReadTimeout(0);
The server configured as spring Controller and access the MySQL DB and run some queries.
In some of the cases, if the call takes 50 seconds, I get 504(Gateway Time-out) response from the server,
and in the server, there is an exception:
"org.apache.catalina.connector.ClientAbortException: null .... Caused by: java.net.SocketException: Connection reset"
What is the reason for the timeout?
It's in the Server side? or on the client side?
Thanks.
spring rest spring-mvc model-view-controller controller
New contributor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using Java, to execute GET request with HttpURLConnection to our server. (Timeout is infinity)
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setConnectTimeout(0);
con.setReadTimeout(0);
The server configured as spring Controller and access the MySQL DB and run some queries.
In some of the cases, if the call takes 50 seconds, I get 504(Gateway Time-out) response from the server,
and in the server, there is an exception:
"org.apache.catalina.connector.ClientAbortException: null .... Caused by: java.net.SocketException: Connection reset"
What is the reason for the timeout?
It's in the Server side? or on the client side?
Thanks.
spring rest spring-mvc model-view-controller controller
New contributor
I'm using Java, to execute GET request with HttpURLConnection to our server. (Timeout is infinity)
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setConnectTimeout(0);
con.setReadTimeout(0);
The server configured as spring Controller and access the MySQL DB and run some queries.
In some of the cases, if the call takes 50 seconds, I get 504(Gateway Time-out) response from the server,
and in the server, there is an exception:
"org.apache.catalina.connector.ClientAbortException: null .... Caused by: java.net.SocketException: Connection reset"
What is the reason for the timeout?
It's in the Server side? or on the client side?
Thanks.
spring rest spring-mvc model-view-controller controller
spring rest spring-mvc model-view-controller controller
New contributor
New contributor
New contributor
asked 19 hours ago
lefispam
1
1
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
MySQL has it's own internal timeout settings. Try running the following sql queries against this database before running your other queries:
SET SESSION connect_timeout=300;
SET SESSION max_execution_time=300;
I believe these variables can also be set to 0 (infinity), although this may affect the stability of the service, and could influence other concurrent users (if there are any).
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
MySQL has it's own internal timeout settings. Try running the following sql queries against this database before running your other queries:
SET SESSION connect_timeout=300;
SET SESSION max_execution_time=300;
I believe these variables can also be set to 0 (infinity), although this may affect the stability of the service, and could influence other concurrent users (if there are any).
add a comment |
up vote
0
down vote
MySQL has it's own internal timeout settings. Try running the following sql queries against this database before running your other queries:
SET SESSION connect_timeout=300;
SET SESSION max_execution_time=300;
I believe these variables can also be set to 0 (infinity), although this may affect the stability of the service, and could influence other concurrent users (if there are any).
add a comment |
up vote
0
down vote
up vote
0
down vote
MySQL has it's own internal timeout settings. Try running the following sql queries against this database before running your other queries:
SET SESSION connect_timeout=300;
SET SESSION max_execution_time=300;
I believe these variables can also be set to 0 (infinity), although this may affect the stability of the service, and could influence other concurrent users (if there are any).
MySQL has it's own internal timeout settings. Try running the following sql queries against this database before running your other queries:
SET SESSION connect_timeout=300;
SET SESSION max_execution_time=300;
I believe these variables can also be set to 0 (infinity), although this may affect the stability of the service, and could influence other concurrent users (if there are any).
answered 19 hours ago
Regan Koopmans
1416
1416
add a comment |
add a comment |
lefispam is a new contributor. Be nice, and check out our Code of Conduct.
lefispam is a new contributor. Be nice, and check out our Code of Conduct.
lefispam is a new contributor. Be nice, and check out our Code of Conduct.
lefispam is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371076%2f504gateway-time-out-on-get-request%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown