postgresql数据库错误-FATAL: could not map anonymous shared memory: Cannot allocate memory
由于项目压测需要,对虚拟机的硬件配置信息由(CPU:24C MEM:32G)改为(CPU:8C MEM:16G),然后重启虚拟机后,postgresql数据库启动失败,具体报错信息如下:FATAL: could not map anonymous shared memory: Cannot allocate memoryHINT: This error usually means that Pos
由于项目压测需要,对虚拟机的硬件配置信息由(CPU:24C MEM:32G)改为(CPU:8C MEM:16G),然后重启虚拟机后,postgresql数据库启动失败,具体报错信息如下:
FATAL: could not map anonymous shared memory: Cannot allocate memory
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory, swap space, or huge pages. To reduce the request size (currently 34610470912 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
网上搜集了下错误原因:由于postgresql设置的shared_buffers参数过大导致(已经超过虚拟机物理内存大小)。
以下为postgresql.conf配置文件内容:
根据性能优化策略,建议shared_buffers参数值设置为本机物理内在的1/4。
把shared_buffers重新设置成4G,保存并退出。重启pg,一切正常。
更多推荐
所有评论(0)