Thread: Fail to start Postgres on Ubuntu kernel 2.6.28-15-generic
Hello,
while on Ubuntu kernel 2.6.28-14-generic Postgres 8.3.7-1 works fine, it doesn't start on Ubuntu 9.04, kernel 2.6.28-15-generic. Following is the log output of 'sudo /etc/init.d/postgresql-8.3 start':
Begin of log ==>
2009-09-08 08:17:52 CAT LOG: could not load root certificate file "root.crt": no SSL error reported
2009-09-08 08:17:52 CAT DETAIL: Will not verify client certificates.
2009-09-08 08:17:52 CAT FATAL: could not create shared memory segment: Invalid argument
2009-09-08 08:17:52 CAT DETAIL: Failed system call was shmget(key=5432001, size=38207488, 03600).
2009-09-08 08:17:52 CAT HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 38207488 bytes), reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 103).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
<== end of log
As a workaround it's possible to boot into the "old" kernel.
Greetings,
Markus
Markus Pscheidt wrote: > Hello, > > while on Ubuntu kernel 2.6.28-14-generic Postgres 8.3.7-1 works fine, it > doesn't start on Ubuntu 9.04, kernel 2.6.28-15-generic. Following is the log > output of 'sudo /etc/init.d/postgresql-8.3 start': > 2009-09-08 08:17:52 CAT FATAL: could not create shared memory segment: > Invalid argument > parameter. You can either reduce the request size or reconfigure the kernel > with larger SHMMAX. To reduce the request size (currently 38207488 bytes), > reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its > max_connections parameter (currently 103). Your new kernel seems to have a smaller setting for its shared memory limits than your old kernel. Or perhaps something else is using more of it. See the manuals for details on how to set a higher limit in /etc/sysctl.conf and see if that does it. -- Richard Huxton Archonet Ltd
2009/9/8 Markus Pscheidt <markus.pscheidt@gmail.com>
quite a common problem... see http://www.postgresql.org/docs/8.3/static/kernel-resources.html
obvious question: what's in /proc/sys/kernel/shmmax ?
maybe your new kernel does not read sysctl settings properly?
Hello,
while on Ubuntu kernel 2.6.28-14-generic Postgres 8.3.7-1 works fine, it doesn't start on Ubuntu 9.04, kernel 2.6.28-15-generic. Following is the log output of 'sudo /etc/init.d/postgresql-8.3 start':
Begin of log ==>
2009-09-08 08:17:52 CAT LOG: could not load root certificate file "root.crt": no SSL error reported
2009-09-08 08:17:52 CAT DETAIL: Will not verify client certificates.
2009-09-08 08:17:52 CAT FATAL: could not create shared memory segment: Invalid argument
2009-09-08 08:17:52 CAT DETAIL: Failed system call was shmget(key=5432001, size=38207488, 03600).
2009-09-08 08:17:52 CAT HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 38207488 bytes), reduce PostgreSQL's shared_buffers parameter (currently 4096) and/or its max_connections parameter (currently 103).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
<== end of log
As a workaround it's possible to boot into the "old" kernel.
quite a common problem... see http://www.postgresql.org/docs/8.3/static/kernel-resources.html
obvious question: what's in /proc/sys/kernel/shmmax ?
maybe your new kernel does not read sysctl settings properly?
--
Filip Rembiałkowski
JID,mailto:filip.rembialkowski@gmail.com
http://filip.rembialkowski.net/
---------- Forwarded message ----------
From: Markus Pscheidt <markus.pscheidt@gmail.com>
Date: 2009/9/8
Subject: Re: [GENERAL] Fail to start Postgres on Ubuntu kernel 2.6.28-15-generic
To: Filip Rembiałkowski <plk.zuber@gmail.com>
Thanks for your help. /proc/sys/kernel/shmmax was just a bit below the shared memory requested by Postgres.
Increasing the kernel's maximum shared memory did the job by adding a line to /etc/sysctl.conf and thereby inreasing it to 100MB:
kernel.shmmax = 104857600
Markus
From: Markus Pscheidt <markus.pscheidt@gmail.com>
Date: 2009/9/8
Subject: Re: [GENERAL] Fail to start Postgres on Ubuntu kernel 2.6.28-15-generic
To: Filip Rembiałkowski <plk.zuber@gmail.com>
quite a common problem... see http://www.postgresql.org/docs/8.3/static/kernel-resources.html
obvious question: what's in /proc/sys/kernel/shmmax ?
Increasing the kernel's maximum shared memory did the job by adding a line to /etc/sysctl.conf and thereby inreasing it to 100MB:
kernel.shmmax = 104857600
Markus