setting resource limits error message

2013-04-25 Thread Jeff Ross

Hi all,

I installed a snapshot last night on our server at work and since then 
I'm getting an error whenever a user logs in over ssh.


013-04-25 13:40:37.284728500 auth.info: sshd[222]: Accepted publickey 
for jross from 10.16.31.10 port 51645 ssh2
2013-04-25 13:40:37.289644500 user.err: Apr 25 13:40:37 sshd: 
postgresql: setting resource limit openfiles: Invalid argument


The postgresql section of my login.conf is:

# For PostgreSQL Database
#
postgresql:\
:maxproc-max=1024:\
:maxproc-cur=512:\
:openfiles-cur=1536:\
:datasize-max=1024M:\
:datasize-cur=256M:\
:stacksize-cur=16M:

Is 1536 now too many openfiles?

I dropped openfiles-cur to 768 as suggested in the pkg_readme and the 
error has stopped.  I'm sure I had a reason for doubling it way back 
when because this is a pretty busy postgresql server.


Didn't see anything in the FAQ or in a google search for this error.

Thanks,

Jeff Ross



Re: setting resource limits error message

2013-04-25 Thread Philip Guenther
On Thu, Apr 25, 2013 at 1:05 PM, Jeff Ross jr...@wykids.org wrote:
 I installed a snapshot last night on our server at work and since then I'm
 getting an error whenever a user logs in over ssh.

 013-04-25 13:40:37.284728500 auth.info: sshd[222]: Accepted publickey for
 jross from 10.16.31.10 port 51645 ssh2
 2013-04-25 13:40:37.289644500 user.err: Apr 25 13:40:37 sshd: postgresql:
 setting resource limit openfiles: Invalid argument

 The postgresql section of my login.conf is:

 # For PostgreSQL Database
 #
 postgresql:\
 :maxproc-max=1024:\
 :maxproc-cur=512:\
 :openfiles-cur=1536:\
...
 Is 1536 now too many openfiles?

No.  The problem is that you can't set the '-cur' value to greater
than the '-max' value, which defaults to 1024.  If you want to set
both to that same higher value, then say openfiles=1536.  Otherwise,
add another line to set 'openfiles-max' to whatever larger value you
desire.


Philip Guenther



Re: setting resource limits error message

2013-04-25 Thread Jeff Ross

On 4/25/13 2:43 PM, Philip Guenther wrote:

On Thu, Apr 25, 2013 at 1:05 PM, Jeff Ross jr...@wykids.org wrote:

I installed a snapshot last night on our server at work and since then I'm
getting an error whenever a user logs in over ssh.

013-04-25 13:40:37.284728500 auth.info: sshd[222]: Accepted publickey for
jross from 10.16.31.10 port 51645 ssh2
2013-04-25 13:40:37.289644500 user.err: Apr 25 13:40:37 sshd: postgresql:
setting resource limit openfiles: Invalid argument

The postgresql section of my login.conf is:

# For PostgreSQL Database
#
postgresql:\
 :maxproc-max=1024:\
 :maxproc-cur=512:\
 :openfiles-cur=1536:\

...

Is 1536 now too many openfiles?

No.  The problem is that you can't set the '-cur' value to greater
than the '-max' value, which defaults to 1024.  If you want to set
both to that same higher value, then say openfiles=1536.  Otherwise,
add another line to set 'openfiles-max' to whatever larger value you
desire.


Philip Guenther


Ah--that makes perfect sense!  Thanks Philip!