On 8/14/07, Sander Steffann <s.steffann@xxxxxxxxxxx> wrote: > Hi Lim, > > >> It might also be in /etc/security/limits.conf. > > > > Thanks. I see these two lines in that file: > > > > postgres soft nofile 8192 > > postgres hard nofile 8192 > > > > How should I change these values? I am not sure how this reflects the > > "ulimit" options. > > Those are limits to the allowed number of open files (ulimit -n). I think > 8192 should be enough for PostgreSQL. The problem you had were related to > other settings, so if only the "nofile" setting is changed your strange > ulimits do not come from here :-) I think I have located the problem. It is in "/etc/profile" where some ulimits are added. This is the offending text, I think: #********************* cPanel Added Limit Protections -- BEGIN #unlimit so we can run the whoami ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null LIMITUSER=$USER if [ -e "/usr/bin/whoami" ]; then LIMITUSER=`/usr/bin/whoami` fi if [ "$LIMITUSER" != "root" ]; then ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null else ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null fi #********************* cPanel Added Limit Protections -- END I am not much of a shell scripter so I am afraid of breaking this, but how can I change the line "if [ "$LIMITUSER" != "root" ];" to include the postgres user as well? Can I do something like: if [ "$LIMITUSER" != "root" and "$LIMITUSER" != "postgres" ]; Would appreciate any thoughts! ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend