Postgres.app Could not start on port 5432

后端 未结 24 1095
暗喜
暗喜 2021-01-29 22:24

I\'m using http://postgresapp.com. In the menubar it gives the error \" Could not start on port 5432.\" Similarly if I try to start the server from the terminal, I get:

24条回答
  •  礼貌的吻别
    2021-01-29 22:59

    Mine failed to start up suddenly, and when I checked Console.app I saw:

    com.heroku.postgres-service: 
    FATAL:  could not create shared memory segment: Cannot allocate memory
    DETAIL:  Failed system call was shmget(key=5432001, size=3874816, 03600).
    HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space, or exceeded your kernel's SHMALL parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMALL.  To reduce the request size (currently 3874816 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
    The PostgreSQL documentation contains more information about shared memory configuration.
    

    It turns out Postgres wouldn't start up because I had Wireshark (and X11) running. It worked fine after I quit Wireshark.

    Good luck!

提交回复
热议问题