Re:12,000 Requests per second with Nginx, PHP and Memcached
by mise on Tuesday February 15, 2011 @06:02AM
(#2220827)
I got someone to install nginx for me on a not-so-busy server. Twice it filled up /tmp and ran out of inodes, crashing the server. I'm in for peak traffic next month and am afraid it will all come crashing down again :) Oh, and any help you can throw at me, it's appreciated.
[ Parent
| on HN ]
Re:12,000 Requests per second with Nginx, PHP and Memcached
by ichilton on Wednesday February 16, 2011 @04:13AM
(#2225766)
Like others already said, that'll be php creating session files, not Nginx.
Sure it ran out of inodes and it isn't that /tmp is a ramdisk/tmpfs and only small? - you can change the session path in your php.ini by changing/setting session.save_path.
If inodes are the problem, you could also store php sessions in memcached - a google search will give you loads of instructions on this, eg: http://www.dotdeb.org/2008/08/25/storing-your-php-sessions-u...
Re:12,000 Requests per second with Nginx, PHP and Memcached
by zepolen on Tuesday February 15, 2011 @08:41AM
(#2221109)
Filled up /tmp with what?
Re:12,000 Requests per second with Nginx, PHP and Memcached
by bxr on Tuesday February 15, 2011 @09:01AM
(#2221175)
I'm going to guess PHP sessions. Off the top of my head its the only /tmp file creating thing I can think of in common web stacks.
If that is the problem mise is facing, you can swap out the storage that PHP uses for sessions (to use something other than files), I'd point out the relevant docs but I have a meeting to get to.
Re:12,000 Requests per second with Nginx, PHP and Memcached
by mise on Tuesday February 15, 2011 @11:35AM
(#2221870)
I'll look into this. My host Servint says that my inode allocation is "generous", so I wonder if I'm the only person running into this problem with PHP+nginx.