Re: Using nginx / haproxy / apache setupr?

2009-11-22 Thread XANi
On Sun, 22 Nov 2009 21:30:51 +0800, Ryan Chan ryanchan...@gmail.com
wrote:
 Hello,
 
 On Sat, Nov 21, 2009 at 4:39 PM, XANi xani...@gmail.com wrote:
  Well haproxy won't buffer response so that will help a bit on
  not-so-slow-but-not-fast-either req. But then u could try use
  apache + mod_worker + php thru fast-cgi I think (not sure tho) in
  that config it will buffer req. in apache, freeing php processes to
  server other req.
 
 
 What is meant by not-so-slow-but-not-fast req?
 
 You mean nginx is able to handle this, but not HA Proxy?
I mean that for example if u tell haproxy to cut all connections to PHP
longer than 60, then php process will still be blocked for 59s.
If u put PHP behind anything that can buffer response then php will
generate all data and it will be buffered in webserver so php process
will not block


-- 
Mariusz Gronczewski (XANi) xani...@gmail.com
GnuPG: 0xEA8ACE64
http://devrandom.pl



signature.asc
Description: PGP signature


Debugging 502 errors

2009-11-22 Thread Nerilaunt Nerilaunt
Hello,

I have a quite big problem with Prestashop under Haproxy.

When I try to use advanced features, I receive 502 errors : 502 Bad
Gateway - The server returned an invalid or incomplete response.

Error log give me something like that :

Nov 22 20:03:10 localhost haproxy[29665]: 1.2.3.4:15870
[22/Nov/2009:20:03:09.713] www srv-www1 25/0/0/-1/985 502 8396 - -
PHVN 20/19/15/9/0 0/0 {domain.tld} POST
/boutique/urladmin/index.php?tab=AdminCatalogid_category=1token=bc27a5d070551ac1e057b5d54fd9dd78
HTTP/1.1

Without Haproxy, it works fine.

I know Haproxy give 502 errors when a bad header is sent by the app
(like 'Location : index.php' instead of 'Location: index.php'), or if
the backend server unexpectedly close the connection (honestly, I
would prefer a more verbose message, who explains exactly what is the
problem).

But here, I don't see any errors like that.

Do you have some ideas in order to debug that ? More verbose logs, tests, ...
I tried with -d mode, but I can't find any 502 error ...

I use Haproxy v. 1.3.22.

Thanks in advance,

Neri



Re: Debugging 502 errors

2009-11-22 Thread Gabriel Sosa
hello,
have you checked your srvtimeout parameter? maybe your script is
taking too long to reply to the haproxy and thats raises the timeout

regards


On Sun, Nov 22, 2009 at 8:59 PM, Nerilaunt Nerilaunt
nerila...@gmail.com wrote:
 Hello,

 I have a quite big problem with Prestashop under Haproxy.

 When I try to use advanced features, I receive 502 errors : 502 Bad
 Gateway - The server returned an invalid or incomplete response.

 Error log give me something like that :

 Nov 22 20:03:10 localhost haproxy[29665]: 1.2.3.4:15870
 [22/Nov/2009:20:03:09.713] www srv-www1 25/0/0/-1/985 502 8396 - -
 PHVN 20/19/15/9/0 0/0 {domain.tld} POST
 /boutique/urladmin/index.php?tab=AdminCatalogid_category=1token=bc27a5d070551ac1e057b5d54fd9dd78
 HTTP/1.1

 Without Haproxy, it works fine.

 I know Haproxy give 502 errors when a bad header is sent by the app
 (like 'Location : index.php' instead of 'Location: index.php'), or if
 the backend server unexpectedly close the connection (honestly, I
 would prefer a more verbose message, who explains exactly what is the
 problem).

 But here, I don't see any errors like that.

 Do you have some ideas in order to debug that ? More verbose logs, tests, ...
 I tried with -d mode, but I can't find any 502 error ...

 I use Haproxy v. 1.3.22.

 Thanks in advance,

 Neri





-- 
Gabriel Sosa
Si buscas resultados distintos, no hagas siempre lo mismo. - Einstein



Re: Debugging 502 errors

2009-11-22 Thread Nerilaunt Nerilaunt
Hello,

Errors appears immediately, not after a long time.

I have timeout server 18, so it's not the problem ...

Thanks,

2009/11/23 Gabriel Sosa sosagabr...@gmail.com:
 hello,
 have you checked your srvtimeout parameter? maybe your script is
 taking too long to reply to the haproxy and thats raises the timeout

 regards


 On Sun, Nov 22, 2009 at 8:59 PM, Nerilaunt Nerilaunt
 nerila...@gmail.com wrote:
 Hello,

 I have a quite big problem with Prestashop under Haproxy.

 When I try to use advanced features, I receive 502 errors : 502 Bad
 Gateway - The server returned an invalid or incomplete response.

 Error log give me something like that :

 Nov 22 20:03:10 localhost haproxy[29665]: 1.2.3.4:15870
 [22/Nov/2009:20:03:09.713] www srv-www1 25/0/0/-1/985 502 8396 - -
 PHVN 20/19/15/9/0 0/0 {domain.tld} POST
 /boutique/urladmin/index.php?tab=AdminCatalogid_category=1token=bc27a5d070551ac1e057b5d54fd9dd78
 HTTP/1.1

 Without Haproxy, it works fine.

 I know Haproxy give 502 errors when a bad header is sent by the app
 (like 'Location : index.php' instead of 'Location: index.php'), or if
 the backend server unexpectedly close the connection (honestly, I
 would prefer a more verbose message, who explains exactly what is the
 problem).

 But here, I don't see any errors like that.

 Do you have some ideas in order to debug that ? More verbose logs, tests, ...
 I tried with -d mode, but I can't find any 502 error ...

 I use Haproxy v. 1.3.22.

 Thanks in advance,

 Neri





 --
 Gabriel Sosa
 Si buscas resultados distintos, no hagas siempre lo mismo. - Einstein