Skip to content

Instantly share code, notes, and snippets.

import json
import pg8000 as dbapi
from pprint import pprint
def getconnection(database,host,port,user,password):
conn= None
try:
conn=dbapi.connect(database=database,host=host, port=port,\
user=user,password=password,ssl=True)
except Exception as err:
@ShawnHenry
ShawnHenry / High_memory_usage_investigation_for_a_Golang_application.md
Last active December 8, 2021 20:28
High memory usage investigation for a Golang application

Abstract

After MP consumer MVP is deployed to production, we noticed that MP consumer have high memory usage between 1.5GB and 3GB, which gradually grows but never shrink.

After the investigation, we find out some root causes and propose some solutions.

Experiments

We run the following experiments to reproduce the issue and try to identify the root cause.