Skip to content

Commit

Permalink
Adjustable Pebble health check timeout (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
weiiwang01 committed Sep 13, 2024
1 parent f525930 commit 94fddf0
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: int
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 94fddf0

Please sign in to comment.