diff --git a/pkg/parser/unix_parser.go b/pkg/parser/unix_parser.go index a6992befe..2e4a8035b 100644 --- a/pkg/parser/unix_parser.go +++ b/pkg/parser/unix_parser.go @@ -148,6 +148,12 @@ func LoadParsers(cConfig *csconfig.Config, parsers *Parsers) (*Parsers, error) { parsers.Ctx.Profiling = true parsers.Povfwctx.Profiling = true } - + /* + Reset CTX grok to reduce memory footprint after we compile all the patterns + */ + parsers.Ctx.Grok = grokky.Host{} + parsers.Povfwctx.Grok = grokky.Host{} + parsers.StageFiles = []Stagefile{} + parsers.PovfwStageFiles = []Stagefile{} return parsers, nil }