Repository navigation
fix: disable ISR memory cache; set prod resource limits - #1824
Conversation
- Set isrMemoryCacheSize: 0 to eliminate LRU bug exposure and reduce memory overhead - memory request: 1300Mi, limit: 1792Mi (based on observed ~1266Mi steady-state) - NODE_OPTIONS --max-old-space-size=1344 (75% of limit) - cpu request: 50m, limit: 200m
|
fix for Greenstand/treetracker-infrastructure#306, For your review @dadiorchen |
|
(for deployment/overlays/prod/deployment.yaml): Quick heads-up on what to expect after this is deployed: the first time any ISR page is requested Next.js saves pre-generated pages to disk inside the container (in the .next/ folder). When After a restart, the first visitor to each page triggers a fresh generation — Next.js fetches the |
|
✅ Cypress integration tests passed in local dev server — pages render correctly |
dadiorchen
left a comment
There was a problem hiding this comment.
@arnoldcastro5000 I think this is the right way to go, please apply this to dev now, and then I hope we can deploy to prod soon
|
Additional steps to be considered:
|
|
deploying to dev: DEPLOYMENT STATUS did not have enough Memory at 1300Mi, so I reduced to 256Mi MONITORING: |
|
🎉 This PR is included in version 2.9.9 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
New image is up. ISR is set to zero. Memory limits active. |
|
Monitoring - currently at 170M. |
|
monitoring memory use: monitoring file system cache: |
Description
Fixes recurring OOMKills on the production web-map-client pod caused by unbounded
Next.js ISR in-memory cache growth and absence of Kubernetes resource limits.
Observed steady-state memory usage: ~1,266Mi.
Fix for: Greenstand/treetracker-infrastructure#306
Related to: Greenstand/treetracker-infrastructure#300
Type of change
Screenshots
N/A — infrastructure/config change, no UI impact.
How Has This Been Tested?
Notes
deployment-main/intentionally not patched — last commit July 2023, considered dormantDeployment notes
Resource limit changes will trigger an automatic rolling restart on apply.
No manual intervention required. Monitor pod memory on first deployment to
confirm steady-state stays within the 1792Mi limit.
Checklist: