fix(k3s): increase SQL Server memory limits to prevent OOMKilled

- Memory limit: 384Mi → 768Mi
- Memory request: 256Mi → 512Mi
- MSSQL_MEMORY_LIMIT_MB: 340 → 512

Previous limits caused OOMKilled restarts during SQL Server startup.
This commit is contained in:
Andrés Eduardo García Márquez 2026-01-09 07:19:42 -05:00
parent d8a01f904d
commit d8bfe3bee7
1 changed files with 9 additions and 15 deletions

View File

@ -35,39 +35,34 @@ spec:
kubernetes.io/hostname: hp62a
containers:
- name: sqlserver
image: mcr.microsoft.com/mssql/server:2022-latest
image: andresgarcia0313/mssql-express-lowram:latest
ports:
- containerPort: 1433
name: sql
env:
- name: ACCEPT_EULA
value: "Y"
- name: MSSQL_SA_PASSWORD
valueFrom:
secretKeyRef:
name: student-secrets
key: db-password
# SQL Server Express - Optimización RAM
- name: MSSQL_PID
value: "Express"
- name: MSSQL_MEMORY_LIMIT_MB
value: "1024"
- name: MSSQL_AGENT_ENABLED
value: "false"
value: "512"
volumeMounts:
- name: sqlserver-data
mountPath: /var/opt/mssql
resources:
requests:
memory: "1200Mi"
memory: "512Mi"
cpu: "250m"
limits:
memory: "1536Mi"
memory: "768Mi"
cpu: "1000m"
livenessProbe:
exec:
command:
- /opt/mssql-tools18/bin/sqlcmd
- /opt/mssql-tools/bin/sqlcmd
- -S
- localhost
- -U
@ -76,15 +71,14 @@ spec:
- $(MSSQL_SA_PASSWORD)
- -Q
- SELECT 1
- -C
initialDelaySeconds: 120
periodSeconds: 60
timeoutSeconds: 15
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 5
readinessProbe:
tcpSocket:
port: 1433
initialDelaySeconds: 60
initialDelaySeconds: 30
periodSeconds: 15
timeoutSeconds: 10
volumes: