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 2022/10/05 20:06:35 UTC

[GitHub] [couchdb] aalegriadg opened a new issue, #4195: Timeout when making query while purging

aalegriadg opened a new issue, #4195:
URL: https://github.com/apache/couchdb/issues/4195

   I have tried to make a query during a purge of many documents from the database and I get the following timeout error:
   
   `Error running query. Reason: (timeout) The request could not be processed in a reasonable amount of time.`
   
   And the following couchdb log error:
   
   `
   [error] 2022-10-03T15:25:47.790110Z couchdb@127.0.0.1 <0.27022.0> aa85e646df fabric_worker_timeout map_view,'couchdb@127.0.0.1',<<"shards/00000000-7fffffff/database.1664801850">>`
   
   It catches my attention since I am querying a partition whose documents are not included in the purge. That is, I am purging documents from partition2 and querying a view on partition1 using the `get_partitioned_view_result` method.
   
   What is the cause of the error? Is it not possible to perform queries while documents are being purged? Is it due to couchdb configuration? 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org.apache.org

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


[GitHub] [couchdb] nickva commented on issue #4195: Timeout when making query while purging

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

   It's probably because the view shard is processing the purge requests and has to catch up. Processing a lot of purge requests is about same as the making a lot of db updates and waiting for the view to catch up. 
   
   Partition could be located on the same shard as the other partitions and views are built per-shard. So, if the shard hasn't caught up yet, it will block clients waiting the latest updates from the partitions on that shard. One way to handle it could be to [split he shard range](https://docs.couchdb.org/en/3.2.2-docs/cluster/sharding.html#splitting-shards) to hopefully isolate the partition to just one shard.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

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