Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

504 Gateway timeout errors when using reverse proxy

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


jjamor at gmail

Sep 21, 2009, 8:12 AM

Post #1 of 5 (489 views)
Permalink
504 Gateway timeout errors when using reverse proxy

Hello,

I'm experiencing random 504 gateway timeouts, when using cherokee as
reverse proxy. I'm using Cherokee 0.99.22 both in reverse proxy and
internal servers.

I have looked for this error in this list but I can't find :( OTOH, this
error is not very usual, most times the request answers are ok, but a
small portion of them have an *immediate* 504 gateway timeout response.

Sorry if this is a newbie question ;)

Thanks in advance!


Best,

--

Juan Jose Amor Iglesias // -+- ¡Vorágine! -+-
jjamor -at- gmail.com // juanjo -at- dramor.net

-------------------- Visit my Blog! ---------------------
The Boring Stories Written By DrAmor: http://dramor.net/blog/
---------------------------------------------------------------
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


pubcrawler.com at gmail

Sep 21, 2009, 9:04 AM

Post #2 of 5 (450 views)
Permalink
Re: 504 Gateway timeout errors when using reverse proxy [In reply to]

Welcome to Cherokee Juan!

I've experienced similar problems with Cherokee and managed to
successfully work
through them with Alvaro's help. Let's see if we can accomplish the
same for you.

What OS are you using and is this a dedicated server or a shared server?

Second, what sort of utilization of the machine is there - how many
connections or people or other forms of use are there in say a 20
minute time span?

Third, if you type at shell prompt:
ulimit -a

What is value of "open files".

Fourth if you type at shell prompt:
lsof -n | grep cherokee | more

How many pages of more do you have during peak use time?

Finally, what are you reverse proxying?

-Paul



On 9/21/09, Juan José Amor <jjamor [at] gmail> wrote:
>
> Hello,
>
> I'm experiencing random 504 gateway timeouts, when using cherokee as
> reverse proxy. I'm using Cherokee 0.99.22 both in reverse proxy and
> internal servers.
>
> I have looked for this error in this list but I can't find :( OTOH, this
> error is not very usual, most times the request answers are ok, but a
> small portion of them have an *immediate* 504 gateway timeout response.
>
> Sorry if this is a newbie question ;)
>
> Thanks in advance!
>
>
> Best,
>
> --
>
> Juan Jose Amor Iglesias // -+- ¡Vorágine! -+-
> jjamor -at- gmail.com // juanjo -at- dramor.net
>
> -------------------- Visit my Blog! ---------------------
> The Boring Stories Written By DrAmor: http://dramor.net/blog/
> ---------------------------------------------------------------
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


aperez at skarcha

Sep 21, 2009, 9:29 AM

Post #3 of 5 (445 views)
Permalink
Re: 504 Gateway timeout errors when using reverse proxy [In reply to]

Hello Juan José! ;)

2009/9/21 Juan José Amor <jjamor [at] gmail>:

> I'm experiencing random 504 gateway timeouts, when using cherokee as
> reverse proxy. I'm using Cherokee 0.99.22 both in reverse proxy and
> internal servers.
>
> I have looked for this error in this list but I can't find :( OTOH, this
> error is not very usual, most times the request answers are ok, but a
> small portion of them have an *immediate* 504 gateway timeout response.

Álvaro has been working on this issue for a while. See "Issue 504" for
"504 Gateway error" :D

http://code.google.com/p/cherokee/issues/detail?id=504

It'd be helpful if you could give a try to latest snapshot from SVN.

--
Saludos:
Antonio Pérez
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


jjamor at gmail

Sep 21, 2009, 6:50 PM

Post #4 of 5 (444 views)
Permalink
Re: 504 Gateway timeout errors when using reverse proxy [In reply to]

Hello!

pub crawler escribió:
> through them with Alvaro's help. Let's see if we can accomplish the
> same for you.
>
> What OS are you using and is this a dedicated server or a shared server?

It is a Sun T2000 running Opensolaris 2009.06 (formerly SunOS 5.11
snv_111b). It is dedicated.

> Second, what sort of utilization of the machine is there - how many
> connections or people or other forms of use are there in say a 20
> minute time span?

The server is in test phase, and it is not receive more than one or two
connections per minute (mine) ;)

> Third, if you type at shell prompt:
> ulimit -a
>
> What is value of "open files".

256.

> Fourth if you type at shell prompt:
> lsof -n | grep cherokee | more
>
> How many pages of more do you have during peak use time?

Now, without activity shows 14 pages.

> Finally, what are you reverse proxying?

I'm proxying a server with three virtual servers: a Drupal (PHP), a
Dokuwiki (PHP) and another with static pages. Also, the same server is
proxying another server with two virtual servers: a Dokuwiki (PHP) and a
Request Tracker (PERL CGI). Random errors appear in any site.

Many thanks!


Best,

--

Juan Jose Amor Iglesias // -+- ¡Vorágine! -+-
jjamor -at- gmail.com // juanjo -at- dramor.net

-------------------- Visit my Blog! ---------------------
The Boring Stories Written By DrAmor: http://dramor.net/blog/
---------------------------------------------------------------
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


pubcrawler.com at gmail

Sep 21, 2009, 7:05 PM

Post #5 of 5 (441 views)
Permalink
Re: 504 Gateway timeout errors when using reverse proxy [In reply to]

Well Alvaro is more familiar with Sun than I am :) Feel free to post
back to the list if you get stuck on something SunOS specific - as it
relates to Cherokee.

I'd say your ulimit for open files is way too low. That's a fixed
resource limit on the user to control users on same server from
overutilizing resources.

My understanding is Cherokee attempts to bump this up at runtime - but
it would appear maybe not high enough or a bug perhaps... Try bumping
the ulimit up. Open a new terminal and do this:
ulimit -n 8096

That will allow more open files to exist at once. 256 open files is
simple to reach.

then in same terminal:
killall cherokee

that will kill Cherokee instance that is running.

Finally in same terminal:
/usr/sbin/cherokee -C /etc/cherokee/cherokee.conf
(your paths likely different in SunOS - but should be able to
determine where Cherokee binary is and where and what your config file
is.)

That will run Cherokee in the terminal - let it run there and go test
for a while to see if Cherokee works as it should.

If this resolves the problem you will need to append a startup script
for your OS to increase that ulimit for open files.

Hopefully this works for you - it worked for me. Took us a few weeks
to figure it out.

Let me know if this solves your issue. If so I'll look in bug tracker
and get right bug entries I've added around this issue appended with
resolution information that ideally covers SunOS and Ubuntu.

-Paul

2009/9/21 Juan José Amor <jjamor [at] gmail>:
>
> Hello!
>
> pub crawler escribió:
>> through them with Alvaro's help. Let's see if we can accomplish the
>> same for you.
>>
>> What OS are you using and is this a dedicated server or a shared server?
>
> It is a Sun T2000 running Opensolaris 2009.06 (formerly SunOS 5.11
> snv_111b). It is dedicated.
>
>> Second, what sort of utilization of the machine is there - how many
>> connections or people or other forms of use are there in say a 20
>> minute time span?
>
> The server is in test phase, and it is not receive more than one or two
> connections per minute (mine) ;)
>
>> Third, if you type at shell prompt:
>> ulimit -a
>>
>> What is value of "open files".
>
> 256.
>
>> Fourth if you type at shell prompt:
>> lsof -n | grep cherokee | more
>>
>> How many pages of more do you have during peak use time?
>
> Now, without activity shows 14 pages.
>
>> Finally, what are you reverse proxying?
>
> I'm proxying a server with three virtual servers: a Drupal (PHP), a
> Dokuwiki (PHP) and another with static pages. Also, the same server is
> proxying another server with two virtual servers: a Dokuwiki (PHP) and a
> Request Tracker (PERL CGI). Random errors appear in any site.
>
> Many thanks!
>
>
> Best,
>
> --
>
>  Juan Jose Amor Iglesias  //  -+- ¡Vorágine! -+-
>  jjamor -at- gmail.com // juanjo -at- dramor.net
>
> --------------------       Visit my Blog! ---------------------
>  The Boring Stories Written By DrAmor: http://dramor.net/blog/
> ---------------------------------------------------------------
>
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.