PDA

View Full Version : kernel problems?


sanmaris
03-02-2005, 07:39
I want to install Gnuworld on my dedicated server and i got this error:

"[ 22:39:40 ] gnuworld@tiger (~)$ /usr/local/pgsql/bin/initdb -D
/usr/local/pgsql/data
The files belonging to this database system will be owned by user "gnuworld".
This user must also own the server process.

Fixing permissions on existing directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... ok
creating directory /usr/local/pgsql/data/global... ok
creating directory /usr/local/pgsql/data/pg_xlog... ok
creating directory /usr/local/pgsql/data/pg_clog... ok
creating template1 database in /usr/local/pgsql/data/base/1...
IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: No space left on
device

This error does *not* mean that you have run out of disk space.

It occurs when either the system limit for the maximum number of
semaphore sets (SEMMNI), or the system wide maximum number of
semaphores (SEMMNS), would be exceeded. You need to raise the
respective kernel parameter. Alternatively, reduce PostgreSQL's
consumption of semaphores by reducing its max_connections parameter
(currently 32).

The PostgreSQL Administrator's Guide contains more information about
configuring your system for PostgreSQL.


initdb failed.
[ 22:39:55 ] gnuworld@tiger (~)$ "


Anybody who know how to repair this? :hey:

ChronoCross
03-02-2005, 16:12
First of all, I'm pasting what semaphores are in order for everyone to know:
Quote:
Semaphores are counters for resources shared between threads. The basic operations on semaphores are: increment the counter atomically, and wait until the counter is non-null and decrement it atomically.


About the problem you're facing, it's a really common problem that I've faced several times for one (or both) of the following 2 reasons: a) there is small amount of semaphores set on your kernel, b) there are some forgotten semaphores in memory (that need to be killed). The most common reason that I've faced this problem is the 2nd (forgotten semaphores).

If this error was reported from the begin, then you probably don't have enough semaphores and you'll have to recompile your kernel (and reboot the server) to increase the limit.

However, if this problem suddenly occured while it used to work fine (and probably happened after you killed manually a proccess or crashed itself) then you'll have to kill some semaphores that may be left on the memory. Even a reboot will fix the problem as it will reset the RAM, but you don't have to reboot to just kill unnecessary semaphores (nobody likes reboots, right?). You may list semaphores (and message queues, shared memory) with ipcs command and kill any unnecessary semaphores with ipcrm -S <semkey>

Keep in mind that several programs needs semaphores to work (ie apache, postgresql, etc).


__________________
psyxakias@sharktech.net (MSN)
Systems Administrator
SharkTECH Internet Services
http://www.sharktech.net


Perhaps using psy's solution for another installing problem will help you out. ike you erro message said it's possible that you just need to kill some leftover sephamores.

psyxakias
03-02-2005, 16:54
sanmaris, ChronoCross already gave you the information I'd give for semaphores. At your case, I'd recommend you to recompile kernel with higher semaphores as GNUworld may need more than default installations.

Also as far as I know, GNUworld is designed by Undernet coders to work alone (or almost alone) on a Dedicated Server (not VDS) as it needs special configurations to your kernel, your daemons and consmes real heavy resources (RAM, disk space).

When I used to work for a shell provider in past (before sharktech), a shell client had requested a custom package that will include GNUworld and while I was installing it for him, I realized that that it didn't worth even if he would pay $50-$100 monthly to the company because of the trouble and the resources consuming it would have.

In short, I wouldn't run it on a VDS at all and I'd only run it on a dedicated server if I wasn't running anything else on it. Like running an IRCD, GNUworld and a few general daemons (ftp/web/mail) would be the only things I'd run on the specific box.

Good Luck !!

PS: Keep in mind, that more than 2 years have passed since the last time I installed GNUworld, so they might have developed a better version that consumes much less resources.