Skip to content

Commit

Permalink
Adjustable Pebble health check timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
weiiwang01 committed Sep 10, 2024
1 parent f525930 commit cc970e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@ options:
description: >
Boolean value denoting whether modsec based WAF should be enabled. Applied if ingress
relation is available.
health_check_timeout_seconds:
type: integer
default: 5
description: >
This setting specifies the duration, in seconds, that pebble will wait for a WordPress health check to complete
before timing out. Use this setting to adjust the timeout based on expected system performance and conditions
2 changes: 1 addition & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ def _init_pebble_layer(self):
"override": "replace",
"level": "alive",
"http": {"url": "http://localhost"},
"timeout": "5s",
"timeout": f"{self.config.get('health_check_timeout_seconds')}s",
},
},
}
Expand Down

0 comments on commit cc970e9

Please sign in to comment.