[10:41] <bencc> setting nofile limit in /etc/security/limits.conf has no effect on a server started by upstart?
[10:51] <jodh> bencc: Upstart doesn't support PAM directly (although it does support rlimits and OOM limits), but you can trigger it to be used if you wish using su/sudo/etc. See http://upstart.ubuntu.com/cookbook/#changing-user.
[10:53] <bencc> jodh: I increased nofile limit in limits.conf but checking /proc/<pid>/limits show it still has 1024 limit
[10:53] <bencc> when adding this to my upstart script the limits are raised limit nofile 30000 30000
[10:53] <bencc> is this specific to upstart or do I need to do the same for init.d script as well?
[10:57] <jodh> bencc: the "limit" stanza is upstart-specific, but you can easily convert it to the shells ulimit syntax.
[10:59] <bencc> jodh: do I put it inside the script ... end script block?
[10:59] <bencc> or in the main block?
[11:01] <jodh> bencc: ?
[11:03] <bencc> jodh:  is this how I use "limit" ? http://dpaste.com/1210781/
[11:04] <bencc> or do I need to put it between lines 20 and 25?
[11:07] <jodh> bencc: it's an upstart stanza, so it does needs to go outside any script stanza as the shell won't understand it. it's fine on line 11 as shown. I thought you already said you had that working??
[11:09] <bencc> jodh: until 10 minutes ago I only used /etc/security/limits.conf
[11:09] <bencc> now I'm trying to understand if I need to do the same for nginx in /etc/init.d/nginx