phpdave11 / gofpdi

Go Free PDF Document Importer
MIT License
119 stars 59 forks source link

There seems to be a memory leak somewhere? #21

Open FourShore opened 4 years ago

FourShore commented 4 years ago

Our app dies after getting this error

"fatal error: concurrent map iteration and map write"

stacktrace leads here

{"line":"\t/go/src/github.com/phpdave11/gofpdi/importer.go:186 +0xdb fp=0xc14d43ee08 sp=0xc14d43ed38 pc=0xbde04b","source":"stderr","tag":"ss-dms"}

Also attaching pprof profile profile003

phpdave11 commented 4 years ago

Feel free to submit a pull request if you are able to fix the memory leak.

There was an issue where the read() function was being called twice which has since been fixed.