Showing posts with the label golang

Go 프로덕션 환경에서 발생한 고루틴 누수(Goroutine Leak) 해결 및 동시성 최적화

지난달, 트래픽이 급증한 마이크로서비스 중 하나가 주기적으로 OOM(Out of Memory)으로 인해 파드가 재시작되는 현상을 겪었다. pprof 를 통해 힙 메모리와 고루틴 스택을 분석한 결과, 범인은 명확했다. 수만 개의 고루틴이 종료되지 못한 채 runtime.gopark 상태에 머물러 있었다. 이는 전형적인 고루틴 누수(Goroutine L…
Go 프로덕션 환경에서 발생한 고루틴 누수(Goroutine Leak) 해결 및 동시성 최적화

Preventing Goroutine Leaks: Graceful Concurrency Patterns in Production Go

Memory leaks in Go are rarely about uncollected objects; they are almost always about orphaned Goroutines. We recently diagnosed a production issue where a backend service, supposedly handling Golan…
Preventing Goroutine Leaks: Graceful Concurrency Patterns in Production Go

Goroutineリークの悪夢から脱出する:Go ContextとChannelによるGolang並行処理の正解

深夜2時、PagerDutyが鳴り止まない。本番環境のメモリ使用グラフが右肩上がりに急上昇し、KubernetesのOOMKillerがPodを次々と殺している。犯人は明白だった。 Golang並行処理 の最大の落とし穴、 Goroutineリーク だ。我々が管理するマイクロサービス(Go 1.21)では、非同期処理のために何千ものGoroutineを生成していたが、適切な終了処理が行われて…
Goroutineリークの悪夢から脱出する:Go ContextとChannelによるGolang並行処理の正解

Deteniendo Fugas de Gorutinas en Producción: Patrones de Canales y Contexto

Recientemente, nuestro sistema de monitoreo en Prometheus disparó una alerta crítica: el consumo de memoria en uno de nuestros microservicios de procesamiento de pagos aumentó un 400% en cuestión d…
Deteniendo Fugas de Gorutinas en Producción: Patrones de Canales y Contexto
OlderHomeNewest