Re: [Catalyst] Bad gateway error

2009-05-02 Thread Ash Berlin


On 2 May 2009, at 10:31, Octavian Râşniţă wrote:


Hi,

In Catalyst::Manual::Cookbook I read

  # 502 is a Bad Gateway error, and will occur if the backend  
server is down
  # This allows us to display a friendly static page that says  
down for

  # maintenance
  Alias /_errors /var/www/MyApp/root/error-pages
  ErrorDocument 502 /_errors/502.html
...

I've configured Apache this way, but if I stop the external Catalyst  
fastcgi app, instead of giving this HTTP error, it gives a 500  
error, and in the logs I find:


[Sat May 02 12:24:23 2009] [error] [client 89.122.248.135] (2)No  
such file or directory: FastCGI: failed to connect to server /tmp/ 
tb.fcgi: connect() failed
[Sat May 02 12:24:23 2009] [error] [client 89.122.248.135] FastCGI:  
incomplete headers (0 bytes) received from server /tmp/tb.fcgi


Do I need to do something more to make Apache give the 502 error?

Thank you.

Octavian


Then the Cookbook is wrong. I've never seen anything but a 500 error  
from any web server I've used.



___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Bad gateway error

2009-05-02 Thread Chisel Wright
On Sat, May 02, 2009 at 01:55:27PM +0100, Ash Berlin wrote:
 Then the Cookbook is wrong. I've never seen anything but a 500 error  
 from any web server I've used.

When setting up my first apache + fastcgi application I ended up
following the cookbook recipe and switching from 502 to 500.

I assumed I'd done something wrong but it's looking like a doc-patch
might be in order.

-- 
Chisel Wright
e: chi...@herlpacker.co.uk
w: http://www.herlpacker.co.uk/

  For this and the answers to many other questions don't ask me.

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Bad gateway error

2009-05-02 Thread J. Shirley
On Sat, May 2, 2009 at 9:55 PM, Ash Berlin ash_c...@firemirror.com wrote:


 On 2 May 2009, at 10:31, Octavian Râşniţă wrote:

  Hi,

 In Catalyst::Manual::Cookbook I read

  # 502 is a Bad Gateway error, and will occur if the backend server is
 down
  # This allows us to display a friendly static page that says down
 for
  # maintenance
  Alias /_errors /var/www/MyApp/root/error-pages
  ErrorDocument 502 /_errors/502.html
 ...

 I've configured Apache this way, but if I stop the external Catalyst
 fastcgi app, instead of giving this HTTP error, it gives a 500 error, and in
 the logs I find:

 [Sat May 02 12:24:23 2009] [error] [client 89.122.248.135] (2)No such file
 or directory: FastCGI: failed to connect to server /tmp/tb.fcgi: connect()
 failed
 [Sat May 02 12:24:23 2009] [error] [client 89.122.248.135] FastCGI:
 incomplete headers (0 bytes) received from server /tmp/tb.fcgi

 Do I need to do something more to make Apache give the 502 error?

 Thank you.

 Octavian


 Then the Cookbook is wrong. I've never seen anything but a 500 error from
 any web server I've used.


If you have a proxy in front, and the backend is down, you get a 502 error.

-J
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Bad gateway error

2009-05-02 Thread Octavian Râşniţă
From: J. Shirley 
Then the Cookbook is wrong. I've never seen anything but a 500 error from 
any web server I've used.


   If you have a proxy in front, and the backend is down, you get a 502 error.
   -J

  If mod_perl is used, it is clear that there could be a reverse proxy or a 
load balancer in front, that could be also Apache or something else, and in the 
backend there could be one or more Apache servers using mod_perl.

  But if fastcgi is used... I thought that Apache acts like a reverse proxy 
server and the backend server is the fastcgi external server that runs the 
Catalyst app.
  I don't know how would be possible for that front end Apache to run more 
fastcgi external apps.

  Is it necessary to have a 3-parts system when using fastcgi?
  (the front end reverse proxy or load balancer, the back end server that 
connects to the fastcgi external server and that external fastcgi server?)

  Octavian

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Bad gateway error

2009-05-02 Thread Chisel Wright
On Sun, May 03, 2009 at 07:18:50AM +0900, J. Shirley wrote:
If you have a proxy in front, and the backend is down, you get a 502
error.

I'm quite confident (but couldn't confirm until Tuesday) that my
application is setup as per fastcgi / Standalone server mode in the
cookbook, and I get 500 not 502 when the app isn't running.

-- 
Chisel Wright
e: chi...@herlpacker.co.uk
w: http://www.herlpacker.co.uk/

  It's like ingenuity wrapped in stupidity wrapped in a function.

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/