fix(k3s): increase SQL Server memory limits to prevent OOMKilled
Test and Deploy to k3s / test (push) Failing after 1m4s Details
Test and Deploy to k3s / deploy (push) Has been skipped Details

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

Previous limits caused OOMKilled restarts during SQL Server startup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andrés Eduardo García Márquez 2026-01-09 07:19:42 -05:00
parent f51eadd4ec
commit 1913e1d6b1
1 changed files with 9 additions and 15 deletions

View File

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