Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Analogged Posted October 31, 2012 Posted October 31, 2012 I plan on switching to Nginx from Apache as now that traffic is up on this particular server Apache is just eating way to much RAM. It's at the point where i can't upgrade the server anymore as the motherboard isn't capable. Its currently got an Intel Xeon E3-1230 and 32GB of RAM. During peak times Apache hit's the 2400 Max clients limit i have then over time leaks memory until the server dies. Now this isn't the result of IP.Board but other sites i manage on this server. I was just wondering is there anything i should know or check out before running any of the IPS products with Nginx ?
Dmacleo Posted October 31, 2012 Posted October 31, 2012 not sure if it helps but since I am using a cpanel setup I am using nginx plugin for it to proxy to apache. I get spikes of guests often. I have tried the unixy varnish plugin and had slightly better performance but it has issues with logged on users and using ip.content as home page with rewrite rules, use no rewrite for furls and works fine. I just hate the look of the urls, I have tested the nginx admin free and the cpnginx, both work well but the free plugin actually works better with cpanel cloudflare integration. reports ip's correctly while the cpnginx for some reason balks at adding the cloudflare ip's to the http section of the conf file. and cpnginx support is being a real PITA over this, I pretty much told them off over this. apachebooster seems to work well now with cpanel too but I need to examine that more. but if not using cpanel none of this applies.
Analogged Posted November 1, 2012 Author Posted November 1, 2012 I am using cPanel, that's what i was thinking of doing setting it up as a reverse proxy in front of Apache. I want to make sure furl's still work, and i am using IP.Content as my home page. Im not using cloudflare though. Thanks for the info
Analogged Posted November 1, 2012 Author Posted November 1, 2012 I installed nginx as a reverse proxy on top of Apache with cPanel but it seemed like nginx kept crashing and was displaying 502 errors and lagging on all sites on the server. IOWait also skyrocketed while nginx was installed. Since then i have reverted back to just Apache until i decide on what to try next or to just colo another server.
Dmacleo Posted November 1, 2012 Posted November 1, 2012 thats odd, I did not see that on any sites. sounds like maybe the vhosts did not rebuild right. I am using dso with mod_ruid2 and NOT fcgi or suphp on mine.
Dmacleo Posted November 1, 2012 Posted November 1, 2012 some have said disabling gzip in nginx conf helps on servers under high traffic loads
Analogged Posted November 1, 2012 Author Posted November 1, 2012 I as well am using mod_ruid2 as i was hitting an account connect limit with fcgi causing pages to randomly not load while traffic is high. I installed it twice just to make sure everything got built correctly, pages do load but takes forever and then sometimes just 502's. Cacti was reporting but then failed as the lag started but you can see the increase in io wait, it only starts recording again after nginx is disabled. I might try it again and turn GZIP off, the thing is the forum is the only site account on the server using gzip anyways. Thanks the info
Grumpy Posted November 2, 2012 Posted November 2, 2012 I've never really seen the free nginx plugin for cpanel (http://nginxcp.com/) fail for anyone unless they're on unusual settings. It sounds like your server overloaded after installing nginx... and with apache failing, you got 502s. If you're going to try it again, be sure to record what's causing the slow down / resource hog. I doubt nginx would be the direct cause. Above image from cacti is virtually meaningless information other than it was down on diagnosing the issue. Since you're still running apache, options like apachectl fullstatus is still open to you. and the obvious top outputs. Additionally, lower your apache's max child by a lot. To something like 20~40. With nginx in the front, you wouldn't need anymore than that and a low value of it would help you against apache flood attack (intentional or not).
Dmacleo Posted November 2, 2012 Posted November 2, 2012 have had good luck with that plugin, would recommend it to any cpanel user. I use the 5$/month one as it allows directpushing domains from whm interface as well as easy editing extensions processed. ease of use thing.
.time Posted November 5, 2012 Posted November 5, 2012 1. Why do you need cPanel? It's a resource hog itself and it's pretty useless if you aren't reselling space on your server. 2. Proxying to Apache isn't going to do much either, just get rid of it. Here's what I use for FURLs in nginx: http://paste.laravel.com/9S1
bikedorkseattle Posted November 5, 2012 Posted November 5, 2012 2. Proxying to Apache isn't going to do much either, just get rid of it. Here's what I use for FURLs in nginx: http://paste.laravel.com/9S1 It seems to me from everything I've read the choice of dumping apache largely hinges on how much you use .htaccess. If you are using Wordpress plugins that need to write to .htaccess, like a redirect plugin, then it's going to be tough to dump it.
.time Posted November 6, 2012 Posted November 6, 2012 It seems to me from everything I've read the choice of dumping apache largely hinges on how much you use .htaccess. If you are using Wordpress plugins that need to write to .htaccess, like a redirect plugin, then it's going to be tough to dump it. Yeah, but finding someone who can convert your htaccess file shouldn't be that hard.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.