Skip to content

内存溢出 #16

Open
Open

Description

@winflex

选区_072
选区_073

重现过程:只需一个线程持续发SetRequest,为了加剧内存上升的过程,把value设的比较大,例如1k,持续一会后jvm就崩了。
猜测:Segment里面有个entries的list,只add没有remove,相当于把报文都存到内存了

Activity

  1. wenweihu86 commented on Aug 17, 2019

    @wenweihu86
    Owner

    @winflex 在每次snapshot结束后,会调用SegmentedLog.truncatePrefix删除多余的内存segment。
    目前默认的snapshot间隔是1小时,由于你的value比较大,所以建议把snapshot间隔调小一些。
    配置这个字段:RaftOptions.snapshotPeriodSeconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions