
出于某种原因,今晚8点45分,Postgres下台了.我登录到机器,我看到此错误消息:
* Starting Postgresql 8.4 database server * The Postgresql server Failed to start. Please check the log output:2011-04-17 04:46:49 UTC FATAL: Could not create shared memory segment: Cannot allocate memory2011-04-17 04:46:49 UTC DETAIL: Failed system call was shmget(key=5432001,size=16211968,03600).2011-04-17 04:46:49 UTC HINT: This error usually means that Postgresql's request for a shared memory segment exceeded available memory or swap space. To reduce the request size (currently 16211968 bytes),reduce Postgresql's shared_buffers parameter (currently 1792) and/or its max_connections parameter (currently 53). The Postgresql documentation contains more information about shared memory configuration. ...fail!
sysctl -w kernel.shmmax=367108864>sysctl -p /etc/sysctl.conf
那没有做到.然后我编辑了/etc/postgresql/8.4/main/postgresql.conf并降低了max_connections值.这有效…大约10分钟.
现在我得到了同样的错误,无论max_connections有多低.我需要将它设置为至少9(因为这是需要访问此Postgres服务器的Django项目的数量).
关于如何解决这个问题的任何想法?
解决方法 您可以使用’ipcs’命令列出所有SHM段.如果一个程序崩溃而没有删除它们,它们可能正在消耗内存;您可以使用’ipcrm’命令手动删除它们. 总结以上是内存溢出为你收集整理的linux – PostgreSQL无法启动,因为它“无法分配内存”全部内容,希望文章能够帮你解决linux – PostgreSQL无法启动,因为它“无法分配内存”所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)