Skip to content

Commit

Permalink
BS-178 | Increased default tomcat timeout (#84)
Browse files Browse the repository at this point in the history
* BS-178 | Increased API request timeout to 30 minutes

* BS-178 | Increased API request timeout to 10 minutes

* BS-178 | Adding timeout to tomcat

* BS-178 | Siva, Vijay , David | Increased tomcat timeout to 10 minutes

* Removed unused imports

* BS-178 | Set OpenMRS connection properties to defaults

---------

Co-authored-by: Siva Reddy <sivareddy@outlook.com>
  • Loading branch information
daviemukungi and sivareddyp authored Aug 25, 2023
1 parent 2acafaf commit ffe86b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package/docker/bahmni-reports/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV SERVER_PORT=8051
ENV BASE_DIR=/var/run/bahmni-reports
ENV CONTEXT_PATH=/bahmnireports
ENV WAR_DIRECTORY=/var/run/bahmni-reports/bahmni-reports
ENV SERVER_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"
ENV SERVER_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Dsun.net.client.defaultConnectTimeout=600000 -Dsun.net.client.defaultReadTimeout=600000"
ENV DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,address=8003,server=y,suspend=n"

RUN mkdir -p /var/log/bahmni-reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ default void loadTempTable(Connection connection, String tempTableName, String p
Statement statement = connection.createStatement();
statement.execute(createSqlStmt);
try (PreparedStatement pstmtInsert = connection.prepareStatement(insertSqlStmt)) {

TSPageObject pageObject = null;
do {
pageObject = fetchDescendantsByPagination(parentCode, pageSize, offset, "en", httpClient, descendantsUrlTemplate);
Expand Down Expand Up @@ -83,7 +82,7 @@ default TSPageObject fetchDescendantsByPagination(String terminologyCode, int pa

default int getDefaultPageSize(Properties tsProperties) {
String pageSize = System.getenv("REPORTS_TS_PAGE_SIZE");
if (pageSize == null) pageSize = tsProperties.getProperty("ts.defaultPageSize");
if (pageSize == null) pageSize = tsProperties.getProperty("terminologyServer.defaultPageSize");
if (pageSize != null) {
return Integer.parseInt(pageSize);
}
Expand Down

0 comments on commit ffe86b1

Please sign in to comment.