**Failed to allocate bytes in slab allocator for memtx_tuple Tarantool**

在向 Tarantool memtx 写入数据时,出现错误 _"Failed to allocate 153 bytes in slab allocator for memtx_tuple"_,可能的原因有哪些?

点赞
用户1135874
用户1135874

这意味着 memtx 引擎耗尽了内存。Memtx 存储的数据和索引可用内存受 box.cfgmemtx_memory 选项限制,默认为 256MB。可以在运行时增加此限制:

-- add 512Mb
box.cfg({memtx_memory = box.cfg.memtx_memory + 512 * 2^20})

这里是有关监视内存使用情况函数的文档部分:

https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_slab/#lua-function.box.slab.info

2020-05-28 12:40:56