Add OTP resource limits and scale up
OTP was crash-looping with Java OOM at the default 256Mi LimitRange. Added explicit resource limits (1Gi request, 2Gi limit) and -Xmx1536m JVM flag. Scaled replicas from 0 back to 1.
This commit is contained in:
parent
c8d15adc16
commit
1fefffeebc
1 changed files with 16 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
variable "tls_secret_name" {
|
||||
type = string
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
variable "nfs_server" { type = string }
|
||||
|
|
@ -204,7 +204,7 @@ resource "kubernetes_deployment" "otp" {
|
|||
}
|
||||
}
|
||||
spec {
|
||||
replicas = 0 # Scaled down: TfL GTFS data expired, OTP crash-loops on build
|
||||
replicas = 1
|
||||
strategy {
|
||||
type = "Recreate"
|
||||
}
|
||||
|
|
@ -233,6 +233,20 @@ resource "kubernetes_deployment" "otp" {
|
|||
name = "otp-data"
|
||||
mount_path = "/var/opentripplanner"
|
||||
}
|
||||
env {
|
||||
name = "JAVA_TOOL_OPTIONS"
|
||||
value = "-Xmx1536m"
|
||||
}
|
||||
resources {
|
||||
requests = {
|
||||
cpu = "100m"
|
||||
memory = "1Gi"
|
||||
}
|
||||
limits = {
|
||||
cpu = "2"
|
||||
memory = "2Gi"
|
||||
}
|
||||
}
|
||||
}
|
||||
volume {
|
||||
name = "otp-data"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue