Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Aug 24, 2011 9:20 pm 
Offline
Senior Member

Joined: Thu Aug 05, 2010 11:23 pm
Posts: 64
504 Gateway Time-out

check out error.log
Quote:
[error] 7036#0: *75024 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "PURGE /section/supercar.html HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"


how can I solve this issue?


Top
   
 Post subject:
PostPosted: Wed Aug 24, 2011 9:51 pm 
Offline
Senior Member

Joined: Thu Aug 05, 2010 11:23 pm
Posts: 64
I did check out these two links...
http://www.linode.com/forums/viewtopic.php?p=26452
viewtopic.php?p=31257

and this one
http://wiki.nginx.org/NginxHttpProxyMod ... ad_timeout

I am using two 512 linode. One for app the other for database.

The site is on wondpress under the heaviest loads I was using more than 485MB of the allocated RAM. Usually, though the site pushes 400MB.

I got php5-cli php5-cgi psmisc spawn-fcgi installed. Also, I am using nginx,fastcgi, php5-fpm, varnish, apc

/usr/bin/php-fastcgi:
Code:
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 6 -u $FASTCGI_USER -f /usr/bin/php5-cgi


maybe up the children 6 at a time ???

since, I am using APC and php5-fpm... is there a way not to have kill the children when they reach a specified number of requests and respawn fresh ones


Last edited by superdupler on Sun Aug 28, 2011 4:34 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Fri Aug 26, 2011 5:25 pm 
Offline
Senior Member

Joined: Thu Aug 05, 2010 11:23 pm
Posts: 64
bump


Top
   
 Post subject:
PostPosted: Fri Aug 26, 2011 5:52 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
I find increasing the number of php fcgi processes past 4 doesn't help, in fact it can make things worse, one php process per core tends to be a good rule, one question, why are you sending purge requests to php?
Code:
PURGE /section/supercar.html HTTP/1.0

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Sun Aug 28, 2011 4:34 pm 
Offline
Senior Member

Joined: Thu Aug 05, 2010 11:23 pm
Posts: 64
where should I send it to? How would you do it?

Something is sending 'purge requests to php' I guess. To be honest with you, I don't even know what that means. I just took settings for php5-fpm, varnish, apc etc from here and there to speed up the server.

When I get heavy load on the server, it gets time out. The time out could be normal, however, when I look at the error log, I see it gets stuck somewhere.


Top
   
 Post subject:
PostPosted: Sun Aug 28, 2011 7:10 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Sounds like you've over complicated your setup, varnish handles the purge request see https://www.varnish-cache.org/trac/wiki/Purging

If you answer a few questions I'll be able to give better advise.

1) What web server are you running
2) Why are you using PHP-FPM and how did you install it
3) What software are you running i.e wordpress/drupal etc
4) What's your database back end? i.e MySQL

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Sat Sep 03, 2011 1:39 am 
Offline
Senior Member

Joined: Thu Aug 05, 2010 11:23 pm
Posts: 64
Thank you for the link. I am still at a loss on this at the moment.

1) What web server are you running
ubuntu 10.04 - nginx, php5-fpm, varnish, wordpress plugin w3tc (total cache), apc. I also have memcached, and php5-memcache installed. However, since I have 'one app server' memcache isnt active at the moment.

I am wondering if I should install apache2 and have nginx in the front. Any thought on this?

I used these three links. They are similar to each other, one covers more information on what others lack.
http://danielmiessler.com/blog/optimizi ... -memcached

http://blog.nas-admin.org/?p=25

http://tutspundit.com/how-to-install-ng ... ss-part-2/


my settings are combination of those set ups. If you require, I will post my own settings.

I believe it was fast when I solely used danielmiessler's link. When I mix it with tutspundit set up, I think server slow down a bit. However, I didn't benchmark it piece by piece. It is just an overall observation at the moment. I hoped that when the server hits heavy load, it will stay up and serve properly. So, I hope tutspundit's setting provided a better robustness.

I have two 512MB servers. One app server, and the other data server. Eventually, I will add one more app server, and balance it with node balancer.

2) Why are you using PHP-FPM and how did you install it
I need the site to fly without hick ups. The site was slow with Apache, and the server prone to crash on load. When I was on apache, I had everything on the same server. The data, and the app were on the same server without any optimization. I separated the app and the data to two separate servers and opted for nginx instead of apache. Nginx wasnt amazing out the box, but the cpu, memory, and IO rate was lower. So, I decided to bite the bullet to see how much I can squeeze started to optimize the set up.

10.04 server doesn't use php5-fpm. So, I grabbed it from ppa repo and installed it. Using ppa repo isn't highly recommended since it is not in the official release cycle, and several other issues. However, I might get the latest ubuntu distro since it has the latest php5 compare to 10.04 stable release.

3) What software are you running i.e wordpress/drupal etc
wordpress

4) What's your database back end? i.e MySQL
separate stand alone 512 server. This server only has mysql on it.



I really appreciate your help.


Top
   
 Post subject:
PostPosted: Thu Sep 22, 2011 4:57 pm 
Offline
Senior Member

Joined: Thu Aug 05, 2010 11:23 pm
Posts: 64
bump


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group