You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Zachary Zolton <za...@gmail.com> on 2010/05/18 20:57:36 UTC
Proxied CouchDB breaks continuous _changes
Halp!
I've developed an Evently application that I want to be available on
port 80. So, at the suggestion of the mailing list I'm proxying port
80 to CouchDB via nginx.
Unfortunately, the when requesting _changes?feed=continuous via port
80, the server doesn't respond with anything and times out. Everything
else in the app seems to work fine (i.e. CRUD operations and
authentication). Trying the same continuous changes query on port 5984
works just fine.
Hopefully, someone with more awesomeness than I can tell me some nginx
twiddly knobs to try out.
Thanks guys,
Zach
P.S. Here's my nginx.conf: http://www.friendpaste.com/NvXZVgIT8c97DpMeN7e6b
Re: Proxied CouchDB breaks continuous _changes
Posted by J Chris Anderson <jc...@gmail.com>.
On May 18, 2010, at 12:25 PM, Benoit Chesneau wrote:
> On Tue, May 18, 2010 at 8:57 PM, Zachary Zolton
> <za...@gmail.com> wrote:
>> Halp!
>>
>> I've developed an Evently application that I want to be available on
>> port 80. So, at the suggestion of the mailing list I'm proxying port
>> 80 to CouchDB via nginx.
>>
>> Unfortunately, the when requesting _changes?feed=continuous via port
>> 80, the server doesn't respond with anything and times out. Everything
>> else in the app seems to work fine (i.e. CRUD operations and
>> authentication). Trying the same continuous changes query on port 5984
>> works just fine.
>>
>> Hopefully, someone with more awesomeness than I can tell me some nginx
>> twiddly knobs to try out.
>>
>>
>> Thanks guys,
>>
>> Zach
>>
>>
>> P.S. Here's my nginx.conf: http://www.friendpaste.com/NvXZVgIT8c97DpMeN7e6b
>>
>
> `proxy_buffering off;` on _changes path should do the trick.
>
> - benoît
I've been wanting to change the whole to use longpoll anyway because it's much more robust (if a little less efficient)
If this nginx thing doesn't work let me know and I'll try the longpoll switch
Re: Proxied CouchDB breaks continuous _changes
Posted by Daniel Truemper <tr...@googlemail.com>.
Hi,
>> @Sebastian that's correct. I am however using this configuration and
>> everything seem to be working fine for me. As always, YMMV...
>>
>> Is having "proxy_buffering off;" for all paths really a bad thing? I
>> think you'd want that behavior, for instance, when send()'ing
>> individual chunks from a _list function—you wouldn't the proxy to
>> buffer those for a large query result.
>>
>
> Having proxy_buffering on for some page would allows nginx to handle
> most of the load. Without it it will not buffer connections and pass
> them directlty to couchdb which is or not a problem.
FYI: I have added a working configuration to the wiki page that disables proxy buffering only for "_changes" requests. Works for me!
And I have added a sample SSL config to the same page.
Best
Daniel
Re: Proxied CouchDB breaks continuous _changes
Posted by Benoit Chesneau <bc...@gmail.com>.
On Wed, May 19, 2010 at 5:31 PM, Zachary Zolton
<za...@gmail.com> wrote:
> @Sebastian that's correct. I am however using this configuration and
> everything seem to be working fine for me. As always, YMMV...
>
> Is having "proxy_buffering off;" for all paths really a bad thing? I
> think you'd want that behavior, for instance, when send()'ing
> individual chunks from a _list function—you wouldn't the proxy to
> buffer those for a large query result.
>
Having proxy_buffering on for some page would allows nginx to handle
most of the load. Without it it will not buffer connections and pass
them directlty to couchdb which is or not a problem.
- benoit
Re: Proxied CouchDB breaks continuous _changes
Posted by Sebastian Cohnen <se...@googlemail.com>.
On 19.05.2010, at 18:37, Zachary Zolton wrote:
>> I just wanted to point at a possible wiki edit :) It would be very nice if you could add a sentence or two to the wiki describing what the effect is and why you use these settings.
>
> I agree, but I missed the comment box last time. (^_^) Perhaps it
> should be a required field.
>
> Is there an easy way to put a comment on the wiki change? (I mean,
> without reverting modifications...)
no, not that I can think of. I meant adding a short description to the wiki page itself :)
Re: Proxied CouchDB breaks continuous _changes
Posted by Zachary Zolton <za...@gmail.com>.
> I just wanted to point at a possible wiki edit :) It would be very nice if you could add a sentence or two to the wiki describing what the effect is and why you use these settings.
I agree, but I missed the comment box last time. (^_^) Perhaps it
should be a required field.
Is there an easy way to put a comment on the wiki change? (I mean,
without reverting modifications...)
Re: Proxied CouchDB breaks continuous _changes
Posted by Sebastian Cohnen <se...@googlemail.com>.
As I said before, I don't know nginx at all and therefore I also don't know the exact behavior of this setting. If it is a buffer, preventing streaming or chunked transfer encoding at all, I would say yes, you want this basically for all requests/paths.
I just wanted to point at a possible wiki edit :) It would be very nice if you could add a sentence or two to the wiki describing what the effect is and why you use these settings.
On 19.05.2010, at 17:31, Zachary Zolton wrote:
> @Sebastian that's correct. I am however using this configuration and
> everything seem to be working fine for me. As always, YMMV...
>
> Is having "proxy_buffering off;" for all paths really a bad thing? I
> think you'd want that behavior, for instance, when send()'ing
> individual chunks from a _list function—you wouldn't the proxy to
> buffer those for a large query result.
>
> On Wed, May 19, 2010 at 1:59 AM, Sebastian Cohnen
> <se...@googlemail.com> wrote:
>> I don't know nginx at all, but your update to the wiki:
>>
>> location / {
>> proxy_pass http://localhost:5984;
>> proxy_redirect off;
>> proxy_buffering off;
>> proxy_set_header Host $host;
>> proxy_set_header X-Real-IP $remote_addr;
>> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>> }
>>
>> does not seem to do benoits "proxy_buffering off; on _changes path" but rather for all pathes? pls ignore me, when I'm wrong :)
>>
>>
>> On 18.05.2010, at 21:31, Zachary Zolton wrote:
>>
>>> @Benoît 75 internets to you for the correct answer!
>>>
>>> Seriously, though, thanks a bunch... I'll add this to the wiki page.
>>>
>>> On Tue, May 18, 2010 at 2:25 PM, Benoit Chesneau <bc...@gmail.com> wrote:
>>>> On Tue, May 18, 2010 at 8:57 PM, Zachary Zolton
>>>> <za...@gmail.com> wrote:
>>>>> Halp!
>>>>>
>>>>> I've developed an Evently application that I want to be available on
>>>>> port 80. So, at the suggestion of the mailing list I'm proxying port
>>>>> 80 to CouchDB via nginx.
>>>>>
>>>>> Unfortunately, the when requesting _changes?feed=continuous via port
>>>>> 80, the server doesn't respond with anything and times out. Everything
>>>>> else in the app seems to work fine (i.e. CRUD operations and
>>>>> authentication). Trying the same continuous changes query on port 5984
>>>>> works just fine.
>>>>>
>>>>> Hopefully, someone with more awesomeness than I can tell me some nginx
>>>>> twiddly knobs to try out.
>>>>>
>>>>>
>>>>> Thanks guys,
>>>>>
>>>>> Zach
>>>>>
>>>>>
>>>>> P.S. Here's my nginx.conf: http://www.friendpaste.com/NvXZVgIT8c97DpMeN7e6b
>>>>>
>>>>
>>>> `proxy_buffering off;` on _changes path should do the trick.
>>>>
>>>> - benoît
>>>>
>>
>>
Re: Proxied CouchDB breaks continuous _changes
Posted by Zachary Zolton <za...@gmail.com>.
@Sebastian that's correct. I am however using this configuration and
everything seem to be working fine for me. As always, YMMV...
Is having "proxy_buffering off;" for all paths really a bad thing? I
think you'd want that behavior, for instance, when send()'ing
individual chunks from a _list function—you wouldn't the proxy to
buffer those for a large query result.
On Wed, May 19, 2010 at 1:59 AM, Sebastian Cohnen
<se...@googlemail.com> wrote:
> I don't know nginx at all, but your update to the wiki:
>
> location / {
> proxy_pass http://localhost:5984;
> proxy_redirect off;
> proxy_buffering off;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> }
>
> does not seem to do benoits "proxy_buffering off; on _changes path" but rather for all pathes? pls ignore me, when I'm wrong :)
>
>
> On 18.05.2010, at 21:31, Zachary Zolton wrote:
>
>> @Benoît 75 internets to you for the correct answer!
>>
>> Seriously, though, thanks a bunch... I'll add this to the wiki page.
>>
>> On Tue, May 18, 2010 at 2:25 PM, Benoit Chesneau <bc...@gmail.com> wrote:
>>> On Tue, May 18, 2010 at 8:57 PM, Zachary Zolton
>>> <za...@gmail.com> wrote:
>>>> Halp!
>>>>
>>>> I've developed an Evently application that I want to be available on
>>>> port 80. So, at the suggestion of the mailing list I'm proxying port
>>>> 80 to CouchDB via nginx.
>>>>
>>>> Unfortunately, the when requesting _changes?feed=continuous via port
>>>> 80, the server doesn't respond with anything and times out. Everything
>>>> else in the app seems to work fine (i.e. CRUD operations and
>>>> authentication). Trying the same continuous changes query on port 5984
>>>> works just fine.
>>>>
>>>> Hopefully, someone with more awesomeness than I can tell me some nginx
>>>> twiddly knobs to try out.
>>>>
>>>>
>>>> Thanks guys,
>>>>
>>>> Zach
>>>>
>>>>
>>>> P.S. Here's my nginx.conf: http://www.friendpaste.com/NvXZVgIT8c97DpMeN7e6b
>>>>
>>>
>>> `proxy_buffering off;` on _changes path should do the trick.
>>>
>>> - benoît
>>>
>
>
Re: Proxied CouchDB breaks continuous _changes
Posted by Sebastian Cohnen <se...@googlemail.com>.
I don't know nginx at all, but your update to the wiki:
location / {
proxy_pass http://localhost:5984;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
does not seem to do benoits "proxy_buffering off; on _changes path" but rather for all pathes? pls ignore me, when I'm wrong :)
On 18.05.2010, at 21:31, Zachary Zolton wrote:
> @Benoît 75 internets to you for the correct answer!
>
> Seriously, though, thanks a bunch... I'll add this to the wiki page.
>
> On Tue, May 18, 2010 at 2:25 PM, Benoit Chesneau <bc...@gmail.com> wrote:
>> On Tue, May 18, 2010 at 8:57 PM, Zachary Zolton
>> <za...@gmail.com> wrote:
>>> Halp!
>>>
>>> I've developed an Evently application that I want to be available on
>>> port 80. So, at the suggestion of the mailing list I'm proxying port
>>> 80 to CouchDB via nginx.
>>>
>>> Unfortunately, the when requesting _changes?feed=continuous via port
>>> 80, the server doesn't respond with anything and times out. Everything
>>> else in the app seems to work fine (i.e. CRUD operations and
>>> authentication). Trying the same continuous changes query on port 5984
>>> works just fine.
>>>
>>> Hopefully, someone with more awesomeness than I can tell me some nginx
>>> twiddly knobs to try out.
>>>
>>>
>>> Thanks guys,
>>>
>>> Zach
>>>
>>>
>>> P.S. Here's my nginx.conf: http://www.friendpaste.com/NvXZVgIT8c97DpMeN7e6b
>>>
>>
>> `proxy_buffering off;` on _changes path should do the trick.
>>
>> - benoît
>>
Re: Proxied CouchDB breaks continuous _changes
Posted by Zachary Zolton <za...@gmail.com>.
@Benoît 75 internets to you for the correct answer!
Seriously, though, thanks a bunch... I'll add this to the wiki page.
On Tue, May 18, 2010 at 2:25 PM, Benoit Chesneau <bc...@gmail.com> wrote:
> On Tue, May 18, 2010 at 8:57 PM, Zachary Zolton
> <za...@gmail.com> wrote:
>> Halp!
>>
>> I've developed an Evently application that I want to be available on
>> port 80. So, at the suggestion of the mailing list I'm proxying port
>> 80 to CouchDB via nginx.
>>
>> Unfortunately, the when requesting _changes?feed=continuous via port
>> 80, the server doesn't respond with anything and times out. Everything
>> else in the app seems to work fine (i.e. CRUD operations and
>> authentication). Trying the same continuous changes query on port 5984
>> works just fine.
>>
>> Hopefully, someone with more awesomeness than I can tell me some nginx
>> twiddly knobs to try out.
>>
>>
>> Thanks guys,
>>
>> Zach
>>
>>
>> P.S. Here's my nginx.conf: http://www.friendpaste.com/NvXZVgIT8c97DpMeN7e6b
>>
>
> `proxy_buffering off;` on _changes path should do the trick.
>
> - benoît
>
Re: Proxied CouchDB breaks continuous _changes
Posted by Benoit Chesneau <bc...@gmail.com>.
On Tue, May 18, 2010 at 8:57 PM, Zachary Zolton
<za...@gmail.com> wrote:
> Halp!
>
> I've developed an Evently application that I want to be available on
> port 80. So, at the suggestion of the mailing list I'm proxying port
> 80 to CouchDB via nginx.
>
> Unfortunately, the when requesting _changes?feed=continuous via port
> 80, the server doesn't respond with anything and times out. Everything
> else in the app seems to work fine (i.e. CRUD operations and
> authentication). Trying the same continuous changes query on port 5984
> works just fine.
>
> Hopefully, someone with more awesomeness than I can tell me some nginx
> twiddly knobs to try out.
>
>
> Thanks guys,
>
> Zach
>
>
> P.S. Here's my nginx.conf: http://www.friendpaste.com/NvXZVgIT8c97DpMeN7e6b
>
`proxy_buffering off;` on _changes path should do the trick.
- benoît
RE: Proxied CouchDB breaks continuous _changes
Posted by Markus Jelsma <ma...@buyways.nl>.
Hi,
This 3rd-party Nginx module [1] may be of use but i have not tried it with CouchDB. It it works for you, please let us know.
[1]: http://pushmodule.slact.net/
Cheers,
-----Original message-----
From: Zachary Zolton <za...@gmail.com>
Sent: Tue 18-05-2010 20:58
To: user@couchdb.apache.org;
Subject: Proxied CouchDB breaks continuous _changes
Halp!
I've developed an Evently application that I want to be available on
port 80. So, at the suggestion of the mailing list I'm proxying port
80 to CouchDB via nginx.
Unfortunately, the when requesting _changes?feed=continuous via port
80, the server doesn't respond with anything and times out. Everything
else in the app seems to work fine (i.e. CRUD operations and
authentication). Trying the same continuous changes query on port 5984
works just fine.
Hopefully, someone with more awesomeness than I can tell me some nginx
twiddly knobs to try out.
Thanks guys,
Zach
P.S. Here's my nginx.conf: http://www.friendpaste.com/NvXZVgIT8c97DpMeN7e6b