You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Nils Breunese <n....@vpro.nl> on 2009/07/07 10:54:05 UTC

Apache in front of CouchDB: failing tests

Hello all,

We want to use Apache httpd in front of CouchDB, so we can do pretty 
URL's using mod_rewrite, limit what types of requests are allowed, 
handle authentication, etc.

At first a lot of tests in the CouchDB test suite were failing. The 
system administrator setting this for production up found that Apache 
needed AllowEncodedSlashes and nocanon to make sure the %2f sequence in 
URL's is preserved. There were some other problems, but they have been 
solved.

Right now two tests are still failing:

config: # Assertion failed: config.httpd.port == port

This makes sense: we're sending requests to Apache on port 80, but 
CouchDB is running on port 5984. Is this something we should fix or is 
this harmless?

stats: # Assertion 'open_databases > 0 && max >= open_databases, name'
          failed: should keep the same number of open databases when
          reaching the max_dbs_open limit

This doesn't make sense to us right now. Could this have anything to do 
with running Apache httpd in front of CouchDB?

Nils Breunese.

Re: Apache in front of CouchDB: failing tests

Posted by Adam Kocoloski <ko...@apache.org>.
On Jul 7, 2009, at 11:19 AM, Nils Breunese wrote:

> Adam Kocoloski wrote:
>
>> On Jul 7, 2009, at 9:34 AM, Nils Breunese wrote:
>>> Robert Dionne wrote:
>>>
>>>> On Jul 7, 2009, at 4:54 AM, Nils Breunese wrote:
>>>>
>>>>> stats: # Assertion 'open_databases > 0 && max >=  
>>>>> open_databases,  name'
>>>>>       failed: should keep the same number of open databases when
>>>>>       reaching the max_dbs_open limit
>>>> This was a long standing bug with initializing the stats  
>>>> collector  and  is now fixed in trunk
>>> So it's only the stats collector that is not functioning  
>>> properly?  Can we just use CouchDB 0.9.0 if we do not really care  
>>> about the  stats collector?
>>>
>>> This test is not failing on our testing CouchDB (also 0.9.0) by  
>>> the  way. What is the explanation for that?
>> Hi Nils, the bug is also fixed in the 0.9.1 release candidate  
>> being  voted on now.  It's a bug in the stats collector and the  
>> test suite.   The stats collector was not being reset properly on a  
>> call to  _restart, and the test suite was measuring the wrong  
>> field.  The  latter bug is probably why you only saw intermittent  
>> failures or none  at all in 0.9.0.
>> In short, the suite was measuring the maximum rate of DBs being   
>> opened, when it should have measured the number that were open.   
>> So  the results of the test really depended on the environment and  
>> the  hardware.  Hope it helps,
>
> Ok, so it's a bug in the test and not the 'regular' code? So we  
> should be fine using CouchDB 0.9.0 now?
>
> Nils Breunese.

Yes, it's highly unlikely that particular bug has any effect on your  
operation.  However, keep in mind that 0.9.1 is a bugfix release and a  
recommended upgrade for users of 0.9.0 when it comes out.  Here's the  
summary of changes:

http://svn.apache.org/viewvc/couchdb/branches/0.9.x/CHANGES?revision=786852

In particular, if you use attachments, extended Unicode, replication,  
or large numbers of databases (~100 or more) I would highly recommend  
upgrading.  Cheers,

Adam



Re: Apache in front of CouchDB: failing tests

Posted by Nils Breunese <n....@vpro.nl>.
Adam Kocoloski wrote:

> On Jul 7, 2009, at 9:34 AM, Nils Breunese wrote:
> 
>> Robert Dionne wrote:
>>
>>> On Jul 7, 2009, at 4:54 AM, Nils Breunese wrote:
>>>
>>>> stats: # Assertion 'open_databases > 0 && max >= open_databases,  
>>>> name'
>>>>        failed: should keep the same number of open databases when
>>>>        reaching the max_dbs_open limit
>>> This was a long standing bug with initializing the stats collector  
>>> and  is now fixed in trunk
>> So it's only the stats collector that is not functioning properly?  
>> Can we just use CouchDB 0.9.0 if we do not really care about the  
>> stats collector?
>>
>> This test is not failing on our testing CouchDB (also 0.9.0) by the  
>> way. What is the explanation for that?
> 
> Hi Nils, the bug is also fixed in the 0.9.1 release candidate being  
> voted on now.  It's a bug in the stats collector and the test suite.   
> The stats collector was not being reset properly on a call to  
> _restart, and the test suite was measuring the wrong field.  The  
> latter bug is probably why you only saw intermittent failures or none  
> at all in 0.9.0.
> 
> In short, the suite was measuring the maximum rate of DBs being  
> opened, when it should have measured the number that were open.  So  
> the results of the test really depended on the environment and the  
> hardware.  Hope it helps,

Ok, so it's a bug in the test and not the 'regular' code? So we should 
be fine using CouchDB 0.9.0 now?

Nils Breunese.

Re: Apache in front of CouchDB: failing tests

Posted by Adam Kocoloski <ko...@apache.org>.
On Jul 7, 2009, at 9:34 AM, Nils Breunese wrote:

> Robert Dionne wrote:
>
>> On Jul 7, 2009, at 4:54 AM, Nils Breunese wrote:
> >
>>> stats: # Assertion 'open_databases > 0 && max >= open_databases,  
>>> name'
>>>        failed: should keep the same number of open databases when
>>>        reaching the max_dbs_open limit
>> This was a long standing bug with initializing the stats collector  
>> and  is now fixed in trunk
>
> So it's only the stats collector that is not functioning properly?  
> Can we just use CouchDB 0.9.0 if we do not really care about the  
> stats collector?
>
> This test is not failing on our testing CouchDB (also 0.9.0) by the  
> way. What is the explanation for that?
>
> Nils.

Hi Nils, the bug is also fixed in the 0.9.1 release candidate being  
voted on now.  It's a bug in the stats collector and the test suite.   
The stats collector was not being reset properly on a call to  
_restart, and the test suite was measuring the wrong field.  The  
latter bug is probably why you only saw intermittent failures or none  
at all in 0.9.0.

In short, the suite was measuring the maximum rate of DBs being  
opened, when it should have measured the number that were open.  So  
the results of the test really depended on the environment and the  
hardware.  Hope it helps,

Adam


Re: Apache in front of CouchDB: failing tests

Posted by Nils Breunese <n....@vpro.nl>.
Robert Dionne wrote:

> On Jul 7, 2009, at 4:54 AM, Nils Breunese wrote:
 >
>> stats: # Assertion 'open_databases > 0 && max >= open_databases, name'
>>         failed: should keep the same number of open databases when
>>         reaching the max_dbs_open limit
> 
> This was a long standing bug with initializing the stats collector and  
> is now fixed in trunk

So it's only the stats collector that is not functioning properly? Can 
we just use CouchDB 0.9.0 if we do not really care about the stats 
collector?

This test is not failing on our testing CouchDB (also 0.9.0) by the way. 
What is the explanation for that?

Nils.

Re: Apache in front of CouchDB: failing tests

Posted by Robert Dionne <di...@dionne-associates.com>.



On Jul 7, 2009, at 4:54 AM, Nils Breunese wrote:

> Hello all,
>
> We want to use Apache httpd in front of CouchDB, so we can do pretty  
> URL's using mod_rewrite, limit what types of requests are allowed,  
> handle authentication, etc.
>
> At first a lot of tests in the CouchDB test suite were failing. The  
> system administrator setting this for production up found that  
> Apache needed AllowEncodedSlashes and nocanon to make sure the %2f  
> sequence in URL's is preserved. There were some other problems, but  
> they have been solved.
>
> Right now two tests are still failing:
>
> config: # Assertion failed: config.httpd.port == port
>
> This makes sense: we're sending requests to Apache on port 80, but  
> CouchDB is running on port 5984. Is this something we should fix or  
> is this harmless?
>
> stats: # Assertion 'open_databases > 0 && max >= open_databases, name'
>         failed: should keep the same number of open databases when
>         reaching the max_dbs_open limit

This was a long standing bug with initializing the stats collector and  
is now fixed in trunk



>
> This doesn't make sense to us right now. Could this have anything to  
> do with running Apache httpd in front of CouchDB?
>
> Nils Breunese.