- Increase the "requestReadTimeoutDuration" to 5 hours.

- Improve gradle's performance.
This commit is contained in:
Lampros Smyrnaios 2022-12-12 17:49:14 +02:00
parent 6c17e86c70
commit 8c1daadad0
3 changed files with 3 additions and 2 deletions

View File

@ -52,7 +52,7 @@ configurations {
}
// Set increased lower and upper limits for the java-execution.
tasks.withType(JavaExec) {
tasks.withType(JavaExec).configureEach {
jvmArgs = ['-Xms512m', '-Xmx8g']
}

View File

@ -1,4 +1,5 @@
# This script installs and runs the project.
# It also sets the "max-heap-size", depending on the machine's memory.
# For error-handling, we cannot use the "set -e" since: it has problems https://mywiki.wooledge.org/BashFAQ/105
# So we have our own function, for use when a single command fails.

View File

@ -38,7 +38,7 @@ public class AssignmentsHandler {
private static String requestUrl;
private static final Duration requestConnectTimeoutDuration = Duration.ofMinutes(1); // 1 minute.
private static final Duration requestReadTimeoutDuration = Duration.ofHours(3); // 3 hours. Time to wait for the data to get transferred over the network. Many workers may try to get assignments from the Worker, so each worker might have to wait some 10s of minutes for work.
private static final Duration requestReadTimeoutDuration = Duration.ofHours(5); // 5 hours. Time to wait for the data to get transferred over the network. Many workers may try to get assignments from the Worker, so each worker might have to wait some 10s of minutes for work.
// The controller has to retrieve the data from the database, then prepare them in memory, insert them in the "assignment"-table and, finally, return them to the worker.
public static final RestTemplate restTemplate = new RestTemplateBuilder().setConnectTimeout(requestConnectTimeoutDuration).setReadTimeout(requestReadTimeoutDuration).build();