Welcome to the Free Talk Live bulletin board system!
This board is closed to new users and new posts.  Thank you to all our great mods and users over the years.  Details here.
185859 Posts in 9829 Topics by 1371 Members
Latest Member: cjt26
Home Help
+  The Free Talk Live BBS
|-+  Free Talk Live
| |-+  General
| | |-+  Ngix "504 Gateway Timeout" - Techies, can you help?
Pages: [1] 2   Go Down

Author Topic: Ngix "504 Gateway Timeout" - Techies, can you help?  (Read 3541 times)

0 Members and 1 Guest are viewing this topic.

FTL_Ian

  • Professional Iconoclast
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10446
    • View Profile
    • Free Keene
Ngix "504 Gateway Timeout" - Techies, can you help?
« on: January 20, 2010, 11:30:12 AM »

Well, I think this deserves its own thread.

My admins appear to be stumped by this problem that has been plaguing the server for a long time.  It has gotten FAR worse recently since the FTL 2.0 launch, resulting in the server being down for hours at a time.

They have tried many fixes, but the problem has not gone away.

According to Dan, "Some code, or  sequence of code, is causing a PHP process to hang."

Trying to figure out what code that is, is apparently not an easy task.  Would love to hear some ideas on how to address this.
« Last Edit: January 20, 2010, 11:32:48 AM by FTL_Ian »
Logged
Please support the show by joining the AMP program at http//amp.freetalklive.com

I blog at http://freekeene.com

FTL_Ian

  • Professional Iconoclast
  • Administrator
  • *****
  • Offline Offline
  • Posts: 10446
    • View Profile
    • Free Keene
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #1 on: January 20, 2010, 11:34:52 AM »

Latest fix:  We will be forcing PHP to restart every 15 minutes, but that still doesn't address the root of the problem.
« Last Edit: January 20, 2010, 11:38:41 AM by FTL_Ian »
Logged
Please support the show by joining the AMP program at http//amp.freetalklive.com

I blog at http://freekeene.com

blackie

  • Guest
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #2 on: January 20, 2010, 11:41:02 AM »

According to Dan, "Some code, or  sequence of code, is causing a PHP process to hang."
I blame Linux.
Logged

ForumTroll

  • Guest
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #3 on: January 20, 2010, 11:46:19 AM »

Bad RAM?
Logged

theCelestrian

  • Purveyor of Crapulence
  • FTL Creative Team
  • *****
  • Offline Offline
  • Posts: 510
  • [ insert awesomely insightful comment here ]
    • View Profile
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #4 on: January 20, 2010, 11:51:31 AM »

Generally hung processes center around the DB connections - I'm assuming Dan has eliminated the possibility that connection threads are not closing properly, thus causing a "traffic jam" on your servers, correct?

Edit: I'm also assuming you found php was hanging due to running top in your terminal as well, correct?

Only other potential place I could see you having hanging issues is if the new 2.0 site is heavily using AJAX, and some of your XMLHttpRequests (or whatever framework - prototype.ajax, jquery, etc...) maybe be hitting some of your php files (that aggregate the data) so often that it could be potentially causing the problem I mentioned above.
« Last Edit: January 20, 2010, 11:54:42 AM by theCelestrian »
Logged
- Branden
[ insert amazingly cool liberty-oriented witticism of your choice here ]

Robin

  • Offline Offline
  • Posts: 469
  • I may be a bastard, but I'm not a fucking bastard.
    • View Profile
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #5 on: January 20, 2010, 11:53:09 AM »

yeah i pretty much felt like i was detoxing from FTL all day

 :shock:
Logged
But now I'm on a mission to mend. Everything that broke and make it glisten again. Strip down, redesign, construct, and improve. While the rest procrastinate I'll be making my move.

theCelestrian

  • Purveyor of Crapulence
  • FTL Creative Team
  • *****
  • Offline Offline
  • Posts: 510
  • [ insert awesomely insightful comment here ]
    • View Profile
Logged
- Branden
[ insert amazingly cool liberty-oriented witticism of your choice here ]

error

  • AMP Call-In Line Provider
  • FTL Crew
  • *****
  • Offline Offline
  • Posts: 3340
  • Department of Homeland Stupidity
    • View Profile
    • Department of Homeland Stupidity
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #8 on: January 20, 2010, 12:15:21 PM »

It sounds like a common issue.

http://blog.taragana.com/index.php/archive/how-to-stop-crashing-hanging-of-php-cgi-spawn-fcgi-with-nginx-lighttpd/

We've already done that. It had no real effect. Now we have php-fpm. Still no real effect. So we're dealing with something else.
Logged

theCelestrian

  • Purveyor of Crapulence
  • FTL Creative Team
  • *****
  • Offline Offline
  • Posts: 510
  • [ insert awesomely insightful comment here ]
    • View Profile
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #9 on: January 20, 2010, 12:16:35 PM »

It sounds like a common issue.

http://blog.taragana.com/index.php/archive/how-to-stop-crashing-hanging-of-php-cgi-spawn-fcgi-with-nginx-lighttpd/

We've already done that. It had no real effect. Now we have php-fpm. Still no real effect. So we're dealing with something else.

When this happens, has anyone tried SSH'ing into (I'm assuming) mysql to see how it's responding?
Logged
- Branden
[ insert amazingly cool liberty-oriented witticism of your choice here ]

ForumTroll

  • Guest
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #10 on: January 20, 2010, 01:31:38 PM »

Why not just use Apache?
Logged

theCelestrian

  • Purveyor of Crapulence
  • FTL Creative Team
  • *****
  • Offline Offline
  • Posts: 510
  • [ insert awesomely insightful comment here ]
    • View Profile
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #11 on: January 20, 2010, 02:40:22 PM »

Why not just use Apache?

A good question - generally you might be compelled to use a lighter build if your boxes gets über high amounts of traffic, but you don't have the cash to either buy more boxes and load balance, or cache your content with a service like Akamai.

Edit: When you do start geo-location caching, then how your website works and how you develop for it completely changes, because your site no longer simply "refreshes" as soon as you upload the content to your server.
« Last Edit: January 20, 2010, 02:42:27 PM by theCelestrian »
Logged
- Branden
[ insert amazingly cool liberty-oriented witticism of your choice here ]

error

  • AMP Call-In Line Provider
  • FTL Crew
  • *****
  • Offline Offline
  • Posts: 3340
  • Department of Homeland Stupidity
    • View Profile
    • Department of Homeland Stupidity
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #12 on: January 20, 2010, 03:28:35 PM »

Because Apache is a huge hog which was causing even worse problems than this.
Logged

blackie

  • Guest
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #13 on: January 20, 2010, 03:40:11 PM »

Because Apache is a huge hog which was causing even worse problems than this.
Sounds like it's time for a hardware upgrade.
Logged

error

  • AMP Call-In Line Provider
  • FTL Crew
  • *****
  • Offline Offline
  • Posts: 3340
  • Department of Homeland Stupidity
    • View Profile
    • Department of Homeland Stupidity
Re: Ngix "504 Gateway Timeout" - Techies, can you help?
« Reply #14 on: January 20, 2010, 04:15:52 PM »

Because Apache is a huge hog which was causing even worse problems than this.
Sounds like it's time for a hardware upgrade.

Already ordered.
Logged
Pages: [1] 2   Go Up
+  The Free Talk Live BBS
|-+  Free Talk Live
| |-+  General
| | |-+  Ngix "504 Gateway Timeout" - Techies, can you help?

// ]]>

Page created in 0.022 seconds with 33 queries.