Portal Home > Knowledgebase > Articles Database > I get 502 Bad Gateway Nginx and takes up 10 sec to get to my subdomain


I get 502 Bad Gateway Nginx and takes up 10 sec to get to my subdomain




Posted by chong67, 09-13-2010, 01:44 PM
I just transfer my domain to this new registra company like 5 days ago. I am running a forum and a webserver at home. Last few days I been getting this "502 Bad Gateway Nginx". What is it? ============= And also if I go to my subdomain, it takes like 5 to 10 sec before my forum or webpagge show up. Why is it so slow? Last edited by chong67; 09-13-2010 at 01:52 PM.

Posted by quantumphysics, 09-13-2010, 01:59 PM
You are running a webserver at home? ...

Posted by chong67, 09-13-2010, 02:03 PM
Webserver, a few forums on VMware, FTP server and I use to run email server too.

Posted by jasonaward, 09-13-2010, 02:10 PM
Well, it's probably so slow because your server is overloaded. Also 502 Bad Gateway generally suggests that the server (Apache?) you're proxying to on the backend is timing out or all-out failing.What is the CPU usage on the server?

Posted by chong67, 09-13-2010, 02:58 PM
REALLY? All this time I am blamming my hosting company? I am using Apache, php and mySQL all inside Vmware on W7 Professional. There is nobody on my forum(phpBB). I mean I just put it there for fun. CPU Usage. 0% right now. I mean nobody. Some of my sudomain are working and some are not. They all point to this forum. Just different name to get to it. Is it because it has a presistant connection? Do I need to open more connection to mySQL? What can I do to fix this?

Posted by quantumphysics, 09-13-2010, 02:58 PM
Check error logs on what exactly is causing 502?

Posted by Edgar-FS, 09-13-2010, 03:04 PM
Reason your your site loads slow is because your hosting from home chances are you have anywhere from 2mbps to 5mbps on an average host. Compared to most companies who have 10 to 100mbps.

Posted by chong67, 09-13-2010, 03:08 PM
I never have this problem when I was running a forum with asp.net and SQL Server 2005 or 2008 with only 357 kbps upload speed.

Posted by smerz, 09-13-2010, 03:12 PM
I hope your host pointed out to you that it's a (home) server issue. And also that you were nice to your host :-)

Posted by chong67, 09-13-2010, 03:12 PM
I did two subdomain all point to the same URL and it come back quick. Now when I did the 3rd one it says: The website is too busy to show the webpage with HTTP 408/409. I did it again few mins later and did the first two with different subdomain name and it came back but the 3rd subdomain name got back timeout n error with 502 Bad Gateway. Email hosting company and they think it was their problem. Last edited by chong67; 09-13-2010 at 03:16 PM.

Posted by chong67, 09-13-2010, 03:15 PM
I am looking at php error now and I see one of this: httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.130 for ServerName

Posted by chong67, 09-13-2010, 03:56 PM
Delete delete Last edited by chong67; 09-13-2010 at 04:02 PM.

Posted by smerz, 09-13-2010, 04:02 PM
The only thing that your "hoster" could cause is that you cannot resolve your domain name. Those errors likely come from your server (at home). httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.130 for ServerName This error is normal. 192.168.X.X normally not resolve (unless you set something up). If that error is just a warning it should be no problem.

Posted by chong67, 09-13-2010, 04:04 PM
Yah, I have been checing my php error log its not happening anymore. I still think its my hosting company. I even did a tracert and it just hop and hop and then died.

Posted by smerz, 09-13-2010, 04:07 PM
But you are "hosting" it at home right? The only thing the domain provider does is give you the domain and make the subdomain resolvable to your own home IP address right? It might be your isp but unless your domain does not resolve at all it's not the hoster in my opinion. It's possible though that I misunderstood you. I'll let some other folks say something now

Posted by chong67, 09-13-2010, 04:12 PM
Yes, I am using a DNS client to broadcast my IP to the domain registar. That part is working. I only had my domain name with this registar for 4 days. So I create a bunch of subdomain and it does URL redirect or URL masking to my forum at home. Sometimes some of the subdomain work and some of them dont. I just cant seem to figure out why. When I do a tracert, some of them just time out after 15 hops. I am wondering if its my end or the domain registar end?

Posted by harget, 09-13-2010, 04:14 PM
Since it is using phpBB, I bet your running PHP FastCGI. You may want to try to kill your PHP Process and restart it, along with Nginx. 502 Bad Gateway Nginx means it can't proxy the PHP file to PHP FastCGI.

Posted by chong67, 09-13-2010, 04:25 PM
Can you help me here? I reboot my computer everyday. You say kill some process and dont get it started? What else do I need to check? I am running phpbb3. Thanks for helping.

Posted by harget, 09-13-2010, 04:30 PM
Yes, but Nginx can not connect to the port PHP is on. Maybe you binded to another IP since it could be dynamic IPs' at your home.

Posted by chong67, 09-13-2010, 04:32 PM
My IP at home has not changed. It seems to be quit consistant. I am using W7, no Linux or Unix stuff.

Posted by chong67, 09-13-2010, 04:38 PM
C:\Users\Philip>tracert xxx Tracing route to xxx [xx.xxx.x.xx] over a maximum of 30 hops: 1 <1 ms <1 ms 1 ms 192.168.1.1 2 17 ms 9 ms 25 ms 98.242.xxx.x 3 8 ms 6 ms 7 ms xe-11-0-0-0-sur01.c3riverdale.ga.atlanta.comcast .net [68.85.x.xx] 4 7 ms 9 ms 7 ms xe-11-3-0-0-sur01.c1morrow.ga.atlanta.comcast.ne t [68.85.x.xx] 5 10 ms 9 ms 9 ms xe-6-1-0-0-ar01.D1stonemtn.ga.atlanta.comcast.ne t [68.85.x.xx] 6 10 ms 11 ms 13 ms ae-0-0-ar01.b0atlanta.ga.atlanta.comcast.net [68 .85.108.1] 7 11 ms 18 ms 15 ms pos-3-6-0-0-cr01.atlanta.ga.ibone.comcast.net [6 8.86.93.205] 8 37 ms 34 ms 35 ms pos-3-12-0-0-cr01.chicago.il.ibone.comcast.net [ 68.86.85.61] 9 35 ms 35 ms 36 ms pos-0-0-0-0-pe01.350ecermak.il.ibone.comcast.net [68.86.86.34] 10 33 ms 38 ms 33 ms ge-3-3-0.er1.Chi2.Servernap.net [66.252.3.157] 11 33 ms 33 ms 33 ms xe-1-0-6-108.ar1.ord1.us.nlayer.net [69.31.110.1 05] 12 * * * Request timed out. 13 * * * Request timed out. 14 * * * Request timed out. 15 * * * Request timed out. 16 * * * Request timed out. 17 * 33 ms * 66.252.1.36 18 * * * Request timed out. 19 * * * Request timed out. 20 * 33 ms * 66.252.1.36 21 * * 41 ms 66.252.1.36 Is this normal and mean anything?

Posted by REMX, 09-13-2010, 05:55 PM
Are you running any HTTPS services?

Posted by chong67, 09-13-2010, 07:02 PM
No, no HTTPS. Is it easy to do? I dont mind getting some encryption so my co. cant see what I am doing. :-)

Posted by chong67, 09-13-2010, 07:48 PM
Nelly D.: Hello, you've contacted * Live Support! How can I help you today? Philip: Nelly D, I do not know what is happening with my domain name. I tranfer here few days ago and it is very very slow going to all my subdomains Nelly D.: Please provide me with the domain name in question Philip: Can you find out exactly what is going on? I even do tracert and I see some "timeout" Philip: yes .. my domain name is : Nelly D.: Thank you Nelly D.: Hold on please Philip: I transfer to * on Sept 9 Nelly D.: Please be advised to switch to DNS system v1. Nelly D.: Please login to your account and go to Manage domains menu. The propagation will take up to 24 hours. Philip: Are you sure this will cure everything? Philip: Can you some some test for me please? Can I give you a few subdomain and you see how long it take to go there and see if you can see any error? Nelly D.: Yes, this should solve the forwarding issue Philip: I keep getting 502 Time out error on some of them Nelly D.: Please hold on, I will check the subdomains Philip: wait Philip: before you go there, i want see how long it take u for the page to show up Philip: Try *.us How long did it take you before the forum show up on your screen? Nelly D.: Just a minute please Philip: see if take up to 10 sec to show up on your screen? Nelly D.: It took approximately 15 seconds Philip: WOW! See? Why does it take this long ? Nelly D.: It happens because currently there is a a network issue at the datacenter Nelly D.: That is why we recommend to switch to our back up name severs Philip: I try all my subdomains. Some work , some doesnt work and some time out ... So the backup will work fine? When can I come back to normal DNS again? Nelly D.: Our engineers are working on this issue, but unfortunately, the ETA is not available yet Philip: So the best system now is v1 Nelly D.: Currently, yes Philip: Hey, I think its working better with v1 Philip: it seems to be responsive and all my subdomain are working so far Nelly D.: Please let me know if you have any further questions

Posted by chong67, 09-13-2010, 07:51 PM
I have a question for some of you: Are registar and hosting company all in a sweat shop and farming business too and they buy wholesale from a few real domain registar company ??? It is almost like newsgroup providers that do sweat shop farming and wholesale to some of these sublets.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Language: