You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/03/10 19:14:40 UTC

[jira] [Commented] (COUCHDB-2912) Hanging _changes in longpoll feed with _doc_ids filter when other document changes

    [ https://issues.apache.org/jira/browse/COUCHDB-2912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15189660#comment-15189660 ] 

ASF GitHub Bot commented on COUCHDB-2912:
-----------------------------------------

Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/389#issuecomment-194983325
  
    Heartbeats exists to ensure that connection is alive, active and operable, but not to keep it forever (this is actually should be done with timeout=infinity). We cannot relay on protocol level keep-alive because it actually doesn't works as everyone expects and only cause additional hangs (default may be minute to hours). Application level keep-alive is the only way to instantly figure out that things went wrong and time to reconnect. Websockets are effective in unreliable networks because of such approach (ping/pong).
    
    Otherwise we have quite strange case when you do request `GET /db/_changes?feed=continuous&heartbeat=1000&timeout=60000` expecting that timeout will work as usually, but actually it get ignored. That's the first case. Another one is that helps to workaround COUCHDB-2912 issue.


> Hanging _changes in longpoll feed with _doc_ids filter when other document changes
> ----------------------------------------------------------------------------------
>
>                 Key: COUCHDB-2912
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2912
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 2.0.0, 1.6.1
>            Reporter: Myroslav Opyr
>         Attachments: couchdb_clients_requesting_changes.png, couchdb_httpd_request_methods.png, couchdb_httpd_requests.png, couchdb_request_times.png, cpu.png, requirements.txt, test-cdb2.py, test.py
>
>
> Primary issue is:
> # spawn many (70+) longpoll changes requests like:
> /_changes?timeout=26892&style=main_only&include_docs=true&feed=longpoll&filter=_doc_ids&doc_ids=%5B%2253b64bc66e3e4cff9d195c53da691a9b%22%5D&since=95354&limit=25&_nonce=1449572474544
> # change document with id OTHER then 53b64bc66e3e4cff9d195c53da691a9b.
> # all spawned connection never respond (hang forever)
> Secondary is:
> # Clients time-out and close HTTP connection on all spawned longpoll requests
> # CouchDB leaves socket in CLOSE_WAIT state for quite some time consuming available to CouchDB process file descriptors, but eventually (sometimes after quite long time) closes them.
> Tretiary is:
> # Having many sockets in CLOSE_WAIT state (like described above), CouchDB CPU consumption significantly raises overloading the server.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)