Skip to content

Commit

Permalink
Make StuckThreadDetectionValve threshold configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Yevhen Ivantsov committed Nov 26, 2024
1 parent 7e4dbbc commit f7cbf1a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/docs/containers/JIRA.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ see https://tomcat.apache.org/tomcat-7.0-doc/config/index.html.
* `ATL_TOMCAT_PROTOCOL` (default: HTTP/1.1)
* `ATL_TOMCAT_ACCEPTCOUNT` (default: 10)
* `ATL_TOMCAT_MAXHTTPHEADERSIZE` (default: 8192)
* `ATL_TOMCAT_STUCKTHREADDETECTIONVALVE_THRESHOLD` (default: 120)

### Access Log Settings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ data:
<Manager pathname=""/>
<JarScanner scanManifest="false"/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="120" />
threshold="{{ .Values.jira.tomcatConfig.stuckThreadDetectionValveThreshold | default "120" }}" />
</Context>

</Host>
Expand Down
1 change: 1 addition & 0 deletions src/main/charts/jira/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ jira:
# proxyPort is set depending on ingress.https value (80 if http, 443 if https)
proxyPort:
maxHttpHeaderSize: "8192"
stuckThreadDetectionValveThreshold: "120"

# -- Custom server.xml to be mounted into /opt/atlassian/jira/conf
#
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/test/ServerConfigTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ void server_config_config_map(Product product, String generatedByHelm, String re
assertThat(serverConfigMap.getConfigMapData().path("server.xml")).hasTextContaining("maxHttpHeaderSize=\"9876\"");
assertThat(serverConfigMap.getConfigMapData().path("server.xml")).hasTextContaining("proxyPort=\"443\"");
assertThat(serverConfigMap.getConfigMapData().path("server.xml")).hasTextContaining("proxyName=\"" + String.format("%s.com", product.name()));
assertThat(serverConfigMap.getConfigMapData().path("server.xml")).hasTextContaining("threshold=\"120\"");

}
void use_custom_server_xml(Product product, String generatedByHelm, String restrictedSCC) throws Exception {
final var resources = helm.captureKubeResourcesFromHelmChart(product, Map.of(
Expand Down

0 comments on commit f7cbf1a

Please sign in to comment.