How to deal with Ruby 2.1.2 memory leaks?

后端 未结 3 694
你的背包
你的背包 2021-02-04 09:28

I have a worker process which spawns up to 50 threads and do some async operations (most of which are http calls). When I start up the process, it starts with some 35MB of used

3条回答
  •  隐瞒了意图╮
    2021-02-04 09:47

    I'm author of digest/murmurhash and digest/stringbuffer gems.

    Indeed, It seems like have leaks in digest/stringbuffer.

    I'll fix it later.

    Can you explain more code?

    I recommend using singleton methods like this.

    Digest::MurmurHash1.hexdigest(some_data)
    

    Maybe, It's not leak since singleton methods are not using digest/stringbuffer.

提交回复
热议问题