Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-23-2012, 06:47 AM   #1
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
who here has setup nginx?

having issues getting php to work.

curious on peoples setup.

__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 07:01 AM   #2
cooldude7
Confirmed User
 
cooldude7's Avatar
 
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
wild guess.
try removing .htaccess files.,
cooldude7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 07:23 AM   #3
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
I wish I could remember some php on nginx tips, but there were other nginx problems after that made me forget about the PHP stuff. Nginx seems to be one problem after another, so we just added noatime to fstab and went back to a perfectly working, standards compliant Apache setup.
__________________
For historical display only. This information is not current:
support@bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 07:29 AM   #4
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by raymor View Post
I wish I could remember some php on nginx tips, but there were other nginx problems after that made me forget about the PHP stuff. Nginx seems to be one problem after another, so we just added noatime to fstab and went back to a perfectly working, standards compliant Apache setup.
looking to setup nginx for wordpress sites, it can handle it much better than apache.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 07:35 AM   #5
Spudstr
Confirmed User
 
Spudstr's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: In a Tater Patch
Posts: 2,321
Quote:
Originally Posted by fris View Post
looking to setup nginx for wordpress sites, it can handle it much better than apache.
There is no module for PHP for nginx, you need to set it up as php-fpm, it runs as as stand a lone daemon and basically proxies the requests to the socket/php-fpm.
__________________
Managed Hosting - Colocation - Network Services
Yellow Fiber Networks
icq: 19876563
Spudstr is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 07:55 AM   #6
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
I can send you tutorial to mail written by me if you want.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 07:56 AM   #7
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by cooldude7 View Post
wild guess.
try removing .htaccess files.,
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 08:15 AM   #8
AdultEUhost
ORLY?
 
AdultEUhost's Avatar
 
Industry Role:
Join Date: Oct 2005
Location: NL & US
Posts: 2,579
php-fpm is what you want I think
__________________
ICQ: 267-443-722 / leon [at] adulteuhost [dotcom]

Nominated for an XBIZ Award as "Webhost of the Year" in 2007, 2012, 2013 and 2014
AdultEUhost is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 08:42 AM   #9
alias
aliasx
 
alias's Avatar
 
Join Date: Apr 2001
Posts: 19,010
Not sure, just use it for streaming media.
__________________
https://porncorporation.com
alias is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 08:51 AM   #10
pumpercloggs
Confirmed User
 
Join Date: Mar 2007
Posts: 118
you will get even better performance out of apache with varnish in front.
pumpercloggs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 09:00 AM   #11
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Fris, I'd not recommend you go that route... Its great for dissing up plain html, thumbs and stuff, but php-fpm just slows everything right down.
If you still carry on, make sure you test with ab both pre and post nginx
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 09:06 AM   #12
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by borked View Post
Fris, I'd not recommend you go that route... Its great for dissing up plain html, thumbs and stuff, but php-fpm just slows everything right down.
If you still carry on, make sure you test with ab both pre and post nginx
Using php-fpm for years and never had any slowdown problem.Never.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 09:23 AM   #13
Jack Sparrow
Almost goners..
 
Industry Role:
Join Date: May 2008
Location: Netherlands
Posts: 11,420
Nginx is running wp like a mofo on speed!!
Jack Sparrow is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 09:36 AM   #14
mafia_man
Confirmed User
 
mafia_man's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq#: 639544261
Posts: 1,965
Quote:
Originally Posted by KlenTelaris View Post
Using php-fpm for years and never had any slowdown problem.Never.
Never had a problem with php-fpm either. Rasmus recommends it ffs...
__________________
I'm out.
mafia_man is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 09:41 AM   #15
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by Jack Sparrow View Post
Nginx is running wp like a mofo on speed!!
Now all agree on this or i release kraken
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 11:48 AM   #16
Jack Sparrow
Almost goners..
 
Industry Role:
Join Date: May 2008
Location: Netherlands
Posts: 11,420
Quote:
Originally Posted by KlenTelaris View Post
Now all agree on this or i release kraken
Well its true. Running smoother then a babies butt.
Jack Sparrow is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 11:55 AM   #17
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
got it setup fine, just need to tune php-fpm.conf
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 12:06 PM   #18
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by fris View Post
got it setup fine, just need to tune php-fpm.conf
Did you edited fastcgi.params too ?
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 12:29 PM   #19
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Quote:
Originally Posted by Jack Sparrow View Post
Nginx is running wp like a mofo on speed!!
Quote:
Originally Posted by KlenTelaris View Post
Using php-fpm for years and never had any slowdown problem.Never.
Quote:
Originally Posted by mafia_man View Post
Never had a problem with php-fpm either. Rasmus recommends it ffs...
Quote:
Originally Posted by Jack Sparrow View Post
Well its true. Running smoother then a babies butt.
But does nginx+php run faster than Apache with PHP is the question? On your setup perhaps, but maybe because you have too many unnecessary apache modules loaded?

I run an API server that is heavily PHP dependent and has 30million+ requests daily. Load was a bit nuts at one point early last year (load 5ish) and it was only serving around 10mill around then, so I gave nginx+php a try. Configured it to the minimum but it thrashed around like hell, sending load way high. Continuously. The reason being the php-cgi spawing was costing too much.

So, I stripped apache down, tweaked all the settings, now server load is a VERY steady 0.05 with 30mill+ hits.

So, I still hold that apache wins hands down.

Well, for high traffic sites that is... your wp may well run smooth and quick, but wait till it gets enough traffic to start spawning children
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 12:42 PM   #20
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by borked View Post
But does nginx+php run faster than Apache with PHP is the question? On your setup perhaps, but maybe because you have too many unnecessary apache modules loaded?

I run an API server that is heavily PHP dependent and has 30million+ requests daily. Load was a bit nuts at one point early last year (load 5ish) and it was only serving around 10mill around then, so I gave nginx+php a try. Configured it to the minimum but it thrashed around like hell, sending load way high. Continuously. The reason being the php-cgi spawing was costing too much.

So, I stripped apache down, tweaked all the settings, now server load is a VERY steady 0.05 with 30mill+ hits.

So, I still hold that apache wins hands down.

Well, for high traffic sites that is... your wp may well run smooth and quick, but wait till it gets enough traffic to start spawning children
I dont know i have only 50k daily traffic on one server.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 12:49 PM   #21
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
borked, how well did you tune php5-fpm? Did you set it up as a socket or used tcp? Did you use the same caching (built-in to nginx) methods in both? It might just be that you're more familiar with fine-tuning Apache.
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 03:01 PM   #22
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
tbh, I don't know now - it was way back at the beginning of 2011. All I remember was I gave it all the resources I could and it still couldn't handle the load (watched by server-status seeing all the slots fill up, and cpu spike).
I tried it on and off for a few days until I called it quits and got dirty with apache. Honestly never looked back since.
Still, I'm not saying bad of nginx - I use it for thumbs on another server that runs at 2-500mbs (adult stuff, not an API) so that I can use apache with keepalive on for the harder processing. That combo works sweet and brought load down from ~8 to 3. Without nginx handling the thumbs, I couldn't have keep-alive on in apache.

Every circumstance is different I guess - I just wouldn't switch to nginx just cos it's what the other boys are doing... look at your situation and try both in different combinations.

Just like I love MySQL, but things were getting crazy (yes, db optimised to hell). Once I figured out where the bulk of the queries were, I moved them over to lucene/solr and shit has been plain sailing ever since. I never eliminated MySQL, but combining both "just made sense" and the server lives happily ever after.

There is no "one size fits all". A server configuration needs to adapt based on the specific requirements. That's my lesson for today ;)
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 03:04 PM   #23
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by borked View Post
tbh, I don't know now - it was way back at the beginning of 2011. All I remember was I gave it all the resources I could and it still couldn't handle the load (watched by server-status seeing all the slots fill up, and cpu spike).
I tried it on and off for a few days until I called it quits and got dirty with apache. Honestly never looked back since.
Still, I'm not saying bad of nginx - I use it for thumbs on another server that runs at 2-500mbs (adult stuff, not an API) so that I can use apache with keepalive on for the harder processing. That combo works sweet and brought load down from ~8 to 3. Without nginx handling the thumbs, I couldn't have keep-alive on in apache.

Every circumstance is different I guess - I just wouldn't switch to nginx just cos it's what the other boys are doing... look at your situation and try both in different combinations.

Just like I love MySQL, but things were getting crazy (yes, db optimised to hell). Once I figured out where the bulk of the queries were, I moved them over to lucene/solr and shit has been plain sailing ever since. I never eliminated MySQL, but combining both "just made sense" and the server lives happily ever after.

There is no "one size fits all". A server configuration needs to adapt based on the specific requirements. That's my lesson for today ;)
Ah well,atleast you are not bull shiting like raymor Also i think about same scheme when it comes to databases-some parts on mysql,some on sqllite.

Last edited by Klen; 02-23-2012 at 03:07 PM..
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 03:44 PM   #24
Jack Sparrow
Almost goners..
 
Industry Role:
Join Date: May 2008
Location: Netherlands
Posts: 11,420
Quote:
Originally Posted by borked View Post
But does nginx+php run faster than Apache with PHP is the question? On your setup perhaps, but maybe because you have too many unnecessary apache modules loaded?

I run an API server that is heavily PHP dependent and has 30million+ requests daily. Load was a bit nuts at one point early last year (load 5ish) and it was only serving around 10mill around then, so I gave nginx+php a try. Configured it to the minimum but it thrashed around like hell, sending load way high. Continuously. The reason being the php-cgi spawing was costing too much.

So, I stripped apache down, tweaked all the settings, now server load is a VERY steady 0.05 with 30mill+ hits.

So, I still hold that apache wins hands down.

Well, for high traffic sites that is... your wp may well run smooth and quick, but wait till it gets enough traffic to start spawning children
Should not be a problem if you set it up for wordpress and wordpress only.
You can tweak it to the bone, and it will run stable and superfast.

Check out yoast.com, he has some nice posts on nginx server setups and they rock.
Jack Sparrow is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 03:51 PM   #25
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Quote:
Originally Posted by Jack Sparrow View Post
Check out yoast.com, he has some nice posts on nginx server setups and they rock.
Odd that he's running LiteSpeed himself though

For every need there is a different solution...
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 04:57 PM   #26
CYF
Coupon Guru
 
CYF's Avatar
 
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
apache 2.4 was just released, with a lot of speed enhancements. It's reported to be faster than nginx in some aspects. I haven't tested it yet, but it could be an option Fris.
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons

CYF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 05:12 PM   #27
mafia_man
Confirmed User
 
mafia_man's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq#: 639544261
Posts: 1,965
Quote:
Originally Posted by borked View Post
Odd that he's running LiteSpeed himself though

For every need there is a different solution...
Can't use Litespeed for porn anyway. Fucking Mormons.
__________________
I'm out.
mafia_man is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 05:56 PM   #28
BradBreakfast
Confirmed User
 
BradBreakfast's Avatar
 
Join Date: Feb 2008
Posts: 415
I would suggest Varnish Cache
BradBreakfast is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 06:05 PM   #29
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
If you do get it working, definitely DO test, with noatime. For best results, comment out the twenty Apache modules you're not using, like mod_speling. On a 400 Mbps site we did a lot of testing on, Apache was the winner. Speed on all was about the same once noatime was enabled because all severs were then doing the same things. With roughly equal performance, Apache's flexibility and correct implementation of standards pushed it over the top.
__________________
For historical display only. This information is not current:
support@bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 06:22 PM   #30
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
Ray were you using relatime before? If not, did it make a big difference? Does Apache have a noatime-like setting so you don't have to change the mount?
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 08:01 PM   #31
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by Brujah View Post
Ray were you using relatime before? If not, did it make a big difference? Does Apache have a noatime-like setting so you don't have to change the mount?

It was not using relatime. Noatime versus default makes a HUGE difference in IOPS, so for small files, some databases, and those PHP scripts that include a bunch of different .php files. For small files, it cuts disk access roughly in half by making it one read rather than a read and a write.

As far as I know, Apache simply follows the mount specification and doesn't have an option to seperately avoid atime within the application. mod_cache_disk to shm would do it, though.

I haven't tested relatime under a heavy webserver workload. I use it on my desktop homedir and our IMAP server.

Last edited by raymor; 02-23-2012 at 08:04 PM..
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-23-2012, 11:59 PM   #32
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
I don't see how nginx can get around that if a disk mounted without noatime, since that's a kernel-level thing. Every file's access time is altered irrespective of software if noatime is not specifically specified.
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2012, 12:29 AM   #33
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Btw borked can you post httpd -m on that machine where you optimized apache ?
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2012, 01:00 AM   #34
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Quote:
Originally Posted by KlenTelaris View Post
Btw borked can you post httpd -m on that machine where you optimized apache ?
well, it's pretty useless for anyone to follow since it's specific to the sites that run on that server... trying to copy will most likely break your sites. You just have to go through your own list and see what is unnecessary for your sites (and perhaps load them only in the particular vhost config for site-specific modules)

anyway, here's the list for the member site server running at a few hundred mbs:

Code:
Loaded Modules:
 core_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 include_module (shared)
 log_config_module (shared)
 logio_module (shared)
 env_module (shared)
 ext_filter_module (shared)
 mime_magic_module (shared)
 expires_module (shared)
 deflate_module (shared)
 headers_module (shared)
 usertrack_module (shared)
 setenvif_module (shared)
 mime_module (shared)
 status_module (shared)
 autoindex_module (shared)
 info_module (shared)
 vhost_alias_module (shared)
 negotiation_module (shared)
 dir_module (shared)
 actions_module (shared)
 alias_module (shared)
 rewrite_module (shared)
 cgi_module (shared)
 version_module (shared)
 php5_module (shared)
Syntax OK
Other important info:
Code:
CoreDumpDirectory /var/apache-core-dumps

ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 10
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 3

<IfModule prefork.c>
StartServers       50
MinSpareServers    75
MaxSpareServers   150
ServerLimit      700
MaxClients       700
MaxRequestsPerChild  100
</IfModule>
And by offloading static graphics to nginx, apache bw is pure code..
here are the stats at the low point of the day (current bw 154mbs)

Code:
CPU Usage: u2635.41 s536.09 cu0 cs0 - .704% CPU load
21.7 requests/sec - 162.1 kB/second - 7.5 kB/request
20 requests currently being processed, 110 idle workers

__KK___________W____________W__________W___W_K_____________C____
_K_______C__________________C_________C__CKK_K......__WK_W____W_
________........................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
............................................................
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202

Last edited by borked; 02-24-2012 at 01:09 AM..
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2012, 01:13 AM   #35
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
Why offload to nginx instead of another install of apache? Is it because ... nginx is better for that job?
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2012, 01:21 AM   #36
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Quote:
Originally Posted by Brujah View Post
Why offload to nginx instead of another install of apache? Is it because ... nginx is better for that job?
haha, you're trying (in both senses)!

sure, I could put up another install of apache stripped bare on the same server, but have you ever tried to maintain two apache installs?

nginx has the advantage because out of the box it is a bare-minimum httpd engine, that you build up.
Apache comes out of the box quite loaded, that I end up stripping down.

For a server that simply disses up jpegs, loading up nginx was a no-brainer.

As ever, YMMV. If your server is happy running nginx for your sites, who the hell am I to tell you otherwise?
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2012, 01:24 AM   #37
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
it's like saying do you use tomcat or jetty, and why?

you can't group shit simply without knowing the circumstances

let's have some fun with similes:

nginx ==jetty == WBA lightweight == small footprint
apache == tomcat == WBA heavyweight == big footprint
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2012, 08:18 AM   #38
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by KlenTelaris View Post
Did you edited fastcgi.params too ?
[email protected]

if you can send your setup ;)
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-26-2012, 01:42 PM   #39
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by fris View Post
[email protected]

if you can send your setup ;)
I suppose you already resolved problem,but i sent you mail anyway from gfyinfo at email.cz
.I have also some fancy codes which can optimize nginx further so can sent that too.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-26-2012, 05:49 PM   #40
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
ya thanks, got it setup already, just took me a while for the rewrite rules for one of my code igniter projects.

mainly went by this

http://itresident.com/nginx/nginx-an...t-connections/
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-27-2012, 12:17 AM   #41
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Quote:
It's not recommended to use PHP5-FPM via unix socket for more than 300+ concurrent connections due to you will definitely get nasty error: sock failed (11: Resource temporarily unavailable) or connect() failed (11: Resource temporarily unavailable) depending on your version, (you may need to increase start_servers, or min/max_spare_servers), and and every 5th page will be return Error 502. By using tcp/ip as a handler you will get more stability but will loose around 10 connection on each 100 concurrent connection in performance.



And the other 2 tricky things to make it to run more smoothly is to gracefully restart PHP5-FPM every 9 minutes and clear the Query Cache on MySQL every 8 minutes. Again, the time depends on your load and content of your project.
That's interesting - maybe that was my problem when I gave it a go...

note though his article title is misleading, since the majority of those 2k active connections are keep alives and with a timeout of 60seconds (very high imo) is likely to be dead timeouts that will gracefully timeout. He has 200/s reads, which is still a lot but nothing apache couldn't handle easily.

fris if you have both setup, mind posting some benchmark test results with ab with same 100 concurrents?
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-27-2012, 12:44 AM   #42
Bird
Confirmed User
 
Bird's Avatar
 
Join Date: Jan 2005
Location: Stockton
Posts: 4,365
wtf is nginx. Damn now I got to google it...
__________________
ICQ:268731675
Bird is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-27-2012, 01:12 AM   #43
evulvmedia
Confirmed User
 
Industry Role:
Join Date: Jun 2006
Posts: 441
You need VODKA to set up nginx. Drink vodka and it all starts to make sense. Not Wild Goose or whatever the fuck that shit is, because nothing makes sense if you drink that.

Luckily OPs name is also name of cheap and very good Danish vodka. Which, incidentally, is very difficult to get in Denmark.
evulvmedia is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 04:48 PM   #44
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by borked View Post
I don't see how nginx can get around that if a disk mounted without noatime, since that's a kernel-level thing. Every file's access time is altered irrespective of software if noatime is not specifically specified.
To do it on purpose:
Code:
open(filename, O_NOATIME, ...
To do it explicitly you use the flag to open() as above. To do it accidentally and in a way that not only do your users not know you're doing it, but you yourself don't know you're doing it, you try to be as clever as you can with your caching. If your caching code is as "clever" as you can write, by definition you're not clever enough to understand all of it's side effects and you get clever but broken caching like nginx.

Quote:
Originally Posted by Brujah View Post
Ray were you using relatime before? If not, did it make a big difference? Does Apache have a noatime-like setting so you don't have to change the mount?
A patch to use O_NOATIME should be fairly trivial, but a module with no patch would be a little more involved because apr_file_open() doesn't currently pass flags directly to open(). Instead it ORs only the APR_* flags. One would need to make a trivial patch to apr_file_open(), then optionally pass O_NOATIME from a module based on configuration (or just use noatime always).
__________________
For historical display only. This information is not current:
support&#64;bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 07:13 PM   #45
HomerSimpson
Too lazy to set a custom title
 
HomerSimpson's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Springfield
Posts: 13,826
Quote:
Originally Posted by KlenTelaris View Post
I can send you tutorial to mail written by me if you want.
you can send it to celebempire{at}gmail.com also
thanks


Quote:
Originally Posted by pumpercloggs View Post
you will get even better performance out of apache with varnish in front.



Quote:
Originally Posted by fris View Post
looking to setup nginx for wordpress sites, it can handle it much better than apache.
you could also try LiteSpeed from http://www.litespeedtech.com/
it's not free but it's good and easy to use...

Quote:
Originally Posted by Bird View Post
wtf is nginx. Damn now I got to google it...
http://nginx.org/


my services
http://www.awmzone.com/services
__________________
Make a bank with Chaturbate - the best selling webcam program
Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

Last edited by HomerSimpson; 02-28-2012 at 07:15 PM..
HomerSimpson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2012, 07:29 PM   #46
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
Quote:
Originally Posted by raymor View Post
To do it on purpose:
Code:
open(filename, O_NOATIME, ...
To do it explicitly you use the flag to open() as above. To do it accidentally and in a way that not only do your users not know you're doing it, but you yourself don't know you're doing it, you try to be as clever as you can with your caching. If your caching code is as "clever" as you can write, by definition you're not clever enough to understand all of it's side effects and you get clever but broken caching like nginx.



A patch to use O_NOATIME should be fairly trivial, but a module with no patch would be a little more involved because apr_file_open() doesn't currently pass flags directly to open(). Instead it ORs only the APR_* flags. One would need to make a trivial patch to apr_file_open(), then optionally pass O_NOATIME from a module based on configuration (or just use noatime always).
I grep'd the source and couldn't see NOATIME anywhere. I did see it listed in the CHANGES file for version 0.4.1 back in 2006, but then removed the same day. Which files in the code did you find that explicitly use NOATIME?
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-29-2012, 07:37 AM   #47
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
got it setup fine, the only issue was the rewrite rules, its a different system than apache
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.