记一次排查Map failed的坑

2019-04-08  本文已影响0人  ssssssnake

在某个测试环境上(64位)对rocketmq进行压测,出现了这个错误,检查了max_map_count并没有问题,最后发现是ulimit -v被设置成了固定的值,地址空间太小,修改以后错误解决

2019-04-08 11:06:14 ERROR AllocateMappedFileService - map file /upload/rocketmq/ddj/storecommitlog/00000000017179869184 Failed.
java.io.IOException: Map failed
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:940) ~[na:1.8.0_152]
at org.apache.rocketmq.store.MappedFile.init(MappedFile.java:164) [rocketmq-store-4.4.0.jar:4.4.0]
at org.apache.rocketmq.store.MappedFile.<init>(MappedFile.java:73) [rocketmq-store-4.4.0.jar:4.4.0]
at org.apache.rocketmq.store.AllocateMappedFileService.mmapOperation(AllocateMappedFileService.java:183) [rocketmq-store-4.4.0.jar:4.4.0]
at org.apache.rocketmq.store.AllocateMappedFileService.run(AllocateMappedFileService.java:144) [rocketmq-store-4.4.0.jar:4.4.0]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
Caused by: java.lang.OutOfMemoryError: Map failed
at sun.nio.ch.FileChannelImpl.map0(Native Method) ~[na:1.8.0_152]
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:937) ~[na:1.8.0_152]
... 5 common frames omitted

上一篇下一篇

猜你喜欢

热点阅读