Ihsan Sabri | 1 Feb 2009 10:28
Picon

Converting Apache Rewrite contains ! (not) character

I am new to cherokee configuration syntax. How to implement this apache rewrite rules in cherokee:

 RewriteEngine On
 RewriteRule ^/fcke.*    -       [L]
 RewriteRule !\.(txt|html|gif|css|js|jpg|jpeg|cgi|png|htc|swf|flv|jar|ico|xml|gz|bz2)$ /home/mydomain/public_html/index.php

TIA
Ihsan

_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee
Ihsan Sabri | 2 Feb 2009 08:02
Picon

Cherokee+FastCGI PHP and Memory Leak

Today, I try cherokee 0.98.1 + PHP 5.2.8 FastCGI on my production website (350k daily pageview).

Unfortunetly this configuration seems to have memory leak. After 4 hours, the cherokee-worker process use 50MB RES and 407MB VIRT (from 'top' display).

We used nginx and the same php-cgi binary before.  Nginx seems to have constant memory usage over weeks.

We just to try and compare between cherokee and nginx. Both have good performance but cherokee still have buggy memory management.

This is result of 'cherokee -i':

Compilation
 Version: 0.98.1
 Compiled on: Feb  2 2009 10:15:41
 Arguments to configure:  '--prefix=/opt/cherokee' '--disable-ipv6' '--without-mysql'

Installation
 Deps dir: /opt/cherokee/share/cherokee/deps
 Data dir: /opt/cherokee/share/cherokee
 Icons dir: /opt/cherokee/share/cherokee/icons
 Themes dir: /opt/cherokee/share/cherokee/themes
 Plug-in dir: /opt/cherokee/lib/cherokee

Plug-ins
 Built-in:

Support
 IPv6: no
 Pthreads: yes
 Tracing: no
 sendfile(): yes
 syslog(): yes
 Polling methods: select poll epoll  

The web server run on top Centos 5.2, updated daily.

Ihsan

_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee
Alvaro Lopez Ortega | 2 Feb 2009 09:58
Picon
Gravatar

Re: Cherokee+FastCGI PHP and Memory Leak

On 02-feb-09, at 08:02, Ihsan Sabri wrote:

> Today, I try cherokee 0.98.1 + PHP 5.2.8 FastCGI on my production  
> website (350k daily pageview).
>
> Unfortunetly this configuration seems to have memory leak. After 4  
> hours, the cherokee-worker process use 50MB RES and 407MB VIRT (from  
> 'top' display).
> We used nginx and the same php-cgi binary before.  Nginx seems to  
> have constant memory usage over weeks.
> We just to try and compare between cherokee and nginx. Both have  
> good performance but cherokee still have buggy memory management.

It sounds like a show-stopping bug to me.
I'm checking it out right away.

Thanks a million for reporting Ihsan!

--
Greetings, alo
http://www.alobbs.com/
Johnny Robeson | 3 Feb 2009 06:06

Re: Converting Apache Rewrite contains ! (not) character

Ihsan Sabri <ishobr <at> gmail.com> writes:

> 
> I am new to cherokee configuration syntax. How to implement this apache
rewrite rules in cherokee: RewriteEngine On RewriteRule ^/fcke.*    -      
[L] RewriteRule
!\.(txt|html|gif|css|js|jpg|jpeg|cgi|png|htc|swf|flv|jar|ico|xml|gz|bz2)$
/home/mydomain/public_html/index.phpTIAIhsan
> 
use the File Exists Rule type and check Any File and put it above the php
rule instead of doing all that mess.

never believe a mod_rewrite rule that lists everything by hand like that

_______________________________________________
Cherokee mailing list
Cherokee <at> lists.octality.com
http://lists.octality.com/listinfo/cherokee
Alvaro Lopez Ortega | 3 Feb 2009 11:01
Favicon
Gravatar

Re: Converting Apache Rewrite contains ! (not) character

On 03-feb-09, at 06:06, Johnny Robeson wrote:
> Ihsan Sabri <ishobr <at> gmail.com> writes:
>
>> I am new to cherokee configuration syntax. How to implement this  
>> apache
> rewrite rules in cherokee: RewriteEngine On RewriteRule ^/fcke.*    -
> [L] RewriteRule
> !\.(txt|html|gif|css|js|jpg|jpeg|cgi|png|htc|swf|flv|jar|ico|xml|gz| 
> bz2)$
> /home/mydomain/public_html/index.phpTIAIhsan
>>
> use the File Exists Rule type and check Any File and put it above  
> the php
> rule instead of doing all that mess.
>
> never believe a mod_rewrite rule that lists everything by hand like  
> that

That would work, indeed.

However, if you are looking for for performance, the server would be  
slightly faster if you added an extension rule with all those  
extension and set it to use the "Static content" handler.

--
Octality
http://www.octality.com/
Johnny Robeson | 3 Feb 2009 20:02

Re: Converting Apache Rewrite contains ! (not) character


> However, if you are looking for for performance, the server would be  
> slightly faster if you added an extension rule with all those  
> extension and set it to use the "Static content" handler.

alvaro is right about the performance... BUT..
if you do static handling per filetype, you will not be able to
serve that filetype dynamically generated by your cms/framework
Leonel Nunez | 5 Feb 2009 02:13

Re: Upload error

leonel wrote:
> Leonel Nunez wrote:
>   
>>> Looks like I've found the error:
>>>
>>> on my lan I had django working  threaded  and on the production server
>>> was prefork
>>> changed the server to  threaded and ..  TADAAAAAAAAAAAAA  the big file
>>> got uploaded.
>>>
>>>
>>> Saludos..
>>>
>>>
>>> Leonel
>>>
>>>
>>>
>>>   
>>>     
>>>       
>> Nop .. the error came  back ...
>> anywork arround ??
>>
>>
>> Saludos
>>
>>
>> Leonel
>>
>>
>>
>>   
>>     
>
> Just uploaded a   < 7mb size  and did uploaded fine  with bigger filed 
> there's the problem
>
>
> Saludos
>
> LEonel
>
>
>
>   

Just for your information

One more test
Tested on my lan without  SSL  and all worked  fine
all the connection errors  are in 1 producction server uploading  to
HTTPS  files > 7MB size  and with a  256KB and 128 KB upload  dsl

Saludos
pub crawler | 5 Feb 2009 03:09
Picon

Cherokee Reverse Proxy and Gzip

We are new to Cherokee.

Looking to use the reverse proxy features of Cherokee (under Ubuntu)
to protect and improve the performance of our application servers
(Windows based (IIS and ColdFusion)).

Currently, we have simple DNS load balancing going to between two
application servers that split load on our busy website.

We want to use the reverse proxy feature of Cherokee for load
balancing but also to shield our two older Windows/IIS machines from
direct access.

First question is - is this a typical and reasonable job for Cherokee?

Second question is - will Cherokee handle Gzip compression of the
outgoing data to viewers or should that be done on our app servers?
Alvaro Lopez Ortega | 5 Feb 2009 09:41
Favicon
Gravatar

Re: Cherokee Reverse Proxy and Gzip

On 05-feb-09, at 03:09, pub crawler wrote:

> We are new to Cherokee.

Welcome :-)

> Looking to use the reverse proxy features of Cherokee (under Ubuntu)
> to protect and improve the performance of our application servers
> (Windows based (IIS and ColdFusion)).
>
> Currently, we have simple DNS load balancing going to between two
> application servers that split load on our busy website.
>
> We want to use the reverse proxy feature of Cherokee for load
> balancing but also to shield our two older Windows/IIS machines from
> direct access.
>
> First question is - is this a typical and reasonable job for Cherokee?

Sure it is.

> Second question is - will Cherokee handle Gzip compression of the
> outgoing data to viewers or should that be done on our app servers?

Cherokee can work in both ways; it's up to you where you prefer the  
content to be gzip'ed.

Cherokee can handle compressed replies from your back-end servers, but  
it can also compress the outgoing responses if you prefer your  
application server to reply raw content.

--
Octality
http://www.octality.com/
Stefan de Konink | 5 Feb 2009 11:19
Picon
Gravatar

Re: Cherokee Reverse Proxy and Gzip

On Thu, 5 Feb 2009, Alvaro Lopez Ortega wrote:

> > Second question is - will Cherokee handle Gzip compression of the
> > outgoing data to viewers or should that be done on our app servers?
>
> Cherokee can work in both ways; it's up to you where you prefer the
> content to be gzip'ed.
>
> Cherokee can handle compressed replies from your back-end servers, but
> it can also compress the outgoing responses if you prefer your
> application server to reply raw content.

But requires valid content types ;)

Stefan

Gmane