Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3164

Request fails when using _changes?feed=eventsource&heartbeat=30000

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.0
    • Component/s: HTTP Interface
    • Labels:
      None

      Description

      curl -v 'http://localhost:5984/irc/_changes?feed=eventsource&heartbeat=30000&since=now'  --raw
      *   Trying 127.0.0.1...
      * TCP_NODELAY set
      * Connected to localhost (127.0.0.1) port 5984 (#0)
      > GET /irc/_changes?feed=eventsource&heartbeat=30000&since=now HTTP/1.1
      > Host: localhost:5984
      > User-Agent: curl/7.50.3
      > Accept: */*
      > 
      < Cache-Control: no-cache
      < Content-Type: text/event-stream
      < Date: Tue, 27 Sep 2016 22:49:22 GMT
      < Server: CouchDB/2.0.0 (Erlang OTP/19)
      < Transfer-Encoding: chunked
      < X-Couch-Request-ID: e171a23c6b
      < X-CouchDB-Body-Time: 0
      < 
      19
      event: heartbeat
      data: 
      
      
      HTTP/1.1 500 Internal Server Error
      Cache-Control: must-revalidate
      Content-Length: 2473
      Content-Type: application/json
      Date: Tue, 27 Sep 2016 22:49:22 GMT
      Server: CouchDB/2.0.0 (Erlang OTP/19)
      X-Couch-Request-ID: e171a23c6b
      X-Couch-Stack-Hash: 3733362800
      X-CouchDB-Body-Time: 0
      
      {"error":"badmatch","reason":"{\"eventsource\",\n {delayed_resp,#Fun<chttpd.1.133065084>,\n     {httpd,\n         {mochiweb_request,\n             [#Port<0.36671>,\n              [{recbuf,8192}],\n              'GET',\n              \"/irc/_changes?feed=eventsource&heartbeat=30000&since=now\",\n              {1,1},\n              {3,\n               {\"host\",\n                {'Host',\"localhost:5984\"},\n                {\"accept\",{'Accept',\"*/*\"},nil,nil},\n                {\"user-agent\",{'User-Agent',\"curl/7.50.3\"},nil,nil}}}]},\n         \"127.0.0.1\",'GET',\n         [<<\"irc\">>,<<\"_changes?feed=eventsource&heartbeat=30000&since=now\">>],\n         [<<\"irc\">>,<<\"_changes\">>],\n         undefined,\n         {user_ctx,null,[],undefined},\n         undefined,undefined,undefined,undefined,undefined,\n         [{<<\"cookie\">>,#Fun<chttpd_auth.cookie_authentication_handler.1>},\n          {<<\"default\">>,#Fun<chttpd_auth.default_authentication_handler.1>},\n          #Fun<chttpd_auth.party_mode_handler.1>],\n         undefined,chttpd_auth_cache,\n         {1475,16532,891220},\n         'GET',\"e171a23c6b\",undefined,undefined},\n     200,\n     [{\"Content-Type\",\"text/event-stream\"},{\"Cache-Control\",\"no-cache\"}],\n     [],\n     {mochiweb_response,\n         [{mochiweb_request,\n              [#Port<0.36671>,\n               [{recbuf,8192}],\n               'GET',\n               \"/irc/_changes?feed=eventsource&heartbeat=30000&since=now\",\n               {1,1},\n               {3,\n                {\"host\",\n                 {'Host',\"localhost:5984\"},\n                 {\"accept\",{'Accept',\"*/*\"},nil,nil},\n                 {\"user-agent\",{'User-Agent',\"curl/7.50.3\"},nil,nil}}}]},\n          200,\n          {7,\n           {\"cache-control\",\n            {\"Cache-Control\",\"no-cache\"},\n            nil,\n            {\"content-type\",\n             {\"Content-Type\",\"text/event-stream\"},\n             nil,\n             {\"x-couch-request-id\",\n              {\"X-Couch-Request-ID\",\"e171a23c6b\"},\n              {\"server\",\n               {\"Server\",\"CouchDB/2.0.0 (Erlang OTP/19)\"},\n               {\"date\",{\"Date\",\"Tue, 27 Sep 2016 22:49:22 GMT\"},nil,nil},\n               {\"transfer-encoding\",{\"Transfer-Encoding\",\"chunked\"},nil,nil}},\n              {\"x-couchdb-body-time\",\n               {\"X-CouchDB-Body-Time\",\"0\"},\n               nil,nil}}}}}]}}}","ref":3733362800}
      
      

        Issue Links

          Activity

          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 297493f29978d6effd9ae865b5822f54261c6955 in couchdb-chttpd's branch refs/heads/3164-eventsource-timeout from Robert Newson
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=297493f ]

          Fix eventsource timeout handling

          COUCHDB-3164

          Show
          jira-bot ASF subversion and git services added a comment - Commit 297493f29978d6effd9ae865b5822f54261c6955 in couchdb-chttpd's branch refs/heads/3164-eventsource-timeout from Robert Newson [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=297493f ] Fix eventsource timeout handling COUCHDB-3164
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user rnewson opened a pull request:

          https://github.com/apache/couchdb-chttpd/pull/142

          Fix eventsource timeout handling

          COUCHDB-3164

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/cloudant/couchdb-chttpd 3164-eventsource-timeout

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/couchdb-chttpd/pull/142.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #142


          commit 297493f29978d6effd9ae865b5822f54261c6955
          Author: Robert Newson <rnewson@apache.org>
          Date: 2016-09-27T22:44:54Z

          Fix eventsource timeout handling

          COUCHDB-3164


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user rnewson opened a pull request: https://github.com/apache/couchdb-chttpd/pull/142 Fix eventsource timeout handling COUCHDB-3164 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-chttpd 3164-eventsource-timeout Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-chttpd/pull/142.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #142 commit 297493f29978d6effd9ae865b5822f54261c6955 Author: Robert Newson <rnewson@apache.org> Date: 2016-09-27T22:44:54Z Fix eventsource timeout handling COUCHDB-3164
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 297493f29978d6effd9ae865b5822f54261c6955 in couchdb-chttpd's branch refs/heads/master from Robert Newson
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=297493f ]

          Fix eventsource timeout handling

          COUCHDB-3164

          Show
          jira-bot ASF subversion and git services added a comment - Commit 297493f29978d6effd9ae865b5822f54261c6955 in couchdb-chttpd's branch refs/heads/master from Robert Newson [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=297493f ] Fix eventsource timeout handling COUCHDB-3164
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/couchdb-chttpd/pull/142

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/couchdb-chttpd/pull/142

            People

            • Assignee:
              Unassigned
              Reporter:
              gdamjan Damjan Georgievski
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development