You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/03/23 12:20:12 UTC

[GitHub] [couchdb] tudordumitriu opened a new issue #3451: Getting Bad Request (Server - MochiWeb/1.0) when calling _all_docs?include_docs=true&startkey="pz_"&endkey="pz_�"

tudordumitriu opened a new issue #3451:
URL: https://github.com/apache/couchdb/issues/3451


   This might not be necessarily a bug in CouchDB, or maybe it can be overcome since this is a more special context.
   We have some scheduled jobs that run every now and then and even if initially they work as expected (returning the 200 and the expected content) and at some point they start failing.
   
   ## Description
   We have a series of services running in .net that are using the standard HttpClient to issue a Get request:
   URL:  http://admin:xxx@couch-service.default.svc.cluster.local:1234/userdb-11111/_all_docs?include_docs=true&startkey="pz_"&endkey="pz_�" 
   Method: Get
   Headers: Accept - application/json
   
   And this works nicely for a while (even a few days) up until we start getting 
   Status Code: Bad Request 
   Response headers:  Date - Tue, 23 Mar 2021 11:35:09 GMT, Server - MochiWeb/1.0,(Any of you quaids got a smint?)
   
   And we need some help figuring this out because in couchdb logs (info level) there is nothing related to that, 
   Important: Direct calls (curl from another node in cluster with the same request works just fine)
   
   This might be due to us and the way we're managing the HttpClient connections but what is strange that for quite a while everything is working just fine and the request is a clean new one every time, the default headers are ensured same way, so maybe we can debug it somehow or get more details in regards to why is it failing.
   
   ## Your Environment
   CouchDB version used: 3.1.1 (Docker image)
   * Browser name and version: .Net HTTPClient (.Net 5)
   * Operating system and version: Linux Kubernetes running Docker Container
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] tudordumitriu closed issue #3451: Getting Bad Request (Server - MochiWeb/1.0) when calling _all_docs?include_docs=true&startkey="pz_"&endkey="pz_�"

Posted by GitBox <gi...@apache.org>.
tudordumitriu closed issue #3451:
URL: https://github.com/apache/couchdb/issues/3451


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] nickva edited a comment on issue #3451: Getting Bad Request (Server - MochiWeb/1.0) when calling _all_docs?include_docs=true&startkey="pz_"&endkey="pz_�"

Posted by GitBox <gi...@apache.org>.
nickva edited a comment on issue #3451:
URL: https://github.com/apache/couchdb/issues/3451#issuecomment-806176704


   Do you see any elevated metrics like memory or CPU usage? And would you be able to add more logging on the client to capture the error that comes back with a bad request?
   
   It's hard to say what it could be without being able to reproduce it.  Could be that the client connection pool gets messed up and client connections which are in a bad or intermediate state (still receiving) end up recycled. Maybe if session cookies are used the clients don't know how to get new ones, so try switching to basic auth only for a bit.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] tudordumitriu commented on issue #3451: Getting Bad Request (Server - MochiWeb/1.0) when calling _all_docs?include_docs=true&startkey="pz_"&endkey="pz_�"

Posted by GitBox <gi...@apache.org>.
tudordumitriu commented on issue #3451:
URL: https://github.com/apache/couchdb/issues/3451#issuecomment-806572077


   Thanks @nickva 
   We're pretty much on the same line here, and I do suspect the problem is the connection management not the request, mainly because of technical reasons we are trying to reuse HttpClient in .Net (because they have a stranger lifecycle management - and if you abuse them you basically get a really bad performance)
   So with that being said, what we have already tried in this specific case and seems to be holding is creating a new instance of the HttpClient, so that must be it, connection management, some resource being released or something like that.
   Anyways, will keep it like that for a while and see how that goes.
   Appreciate it!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] nickva commented on issue #3451: Getting Bad Request (Server - MochiWeb/1.0) when calling _all_docs?include_docs=true&startkey="pz_"&endkey="pz_�"

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #3451:
URL: https://github.com/apache/couchdb/issues/3451#issuecomment-806176704


   Do you see any elevated metrics like memory or CPU usage? And would you be able to add more logging on the client to capture the error that comes back with a bad request?
   
   It's hard to say what it could be without being able to reproduce it.  Could be that the client connection pool gets messed messed and client connections which are in a bad or intermediate state (still receiving) end up recycled. Maybe if session cookies are used the clients don't know how to get new ones, try switching to basic auth only for a bit.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org