robanstha opened a new issue, #252:
URL: https://github.com/apache/couchdb-docker/issues/252

   Using couchdb 3.3.3 (Also tested on older versions like 3.0.1, 2.x)  in 
docker container and posting documents to database in using _bulk_docs endpoint 
and the memory usage in the docker container spikes up from ~1GB to ~6GB. I'm 
posting ~2700 documents which totals up ~500kb for each 5 databases.
   
   Also, after deleting the database, the memory consumption goes down.
   
   OTP 25 is supposed to have memory leak issue but couchdb 3.3.3 is using OTP 
24:
   ```
   > User-Agent: curl/8.4.0
   > Accept: */*
   > Content-Type: application/json
   > Connection: close
   > Content-Length: 260959
   >
   * We are completely uploaded and fine
   < HTTP/1.1 201 Created
   < Cache-Control: must-revalidate
   < Connection: close
   < Content-Length: 233056
   < Content-Type: application/json
   < Date: Wed, 24 Jan 2024 21:09:09 GMT
   < Server: CouchDB/3.3.3 (Erlang OTP/24)
   < X-Couch-Request-ID: 2b52ff2219
   < X-CouchDB-Body-Time: 2
   ```
   
   Example of all databases and its size created using curl:
   
![image](https://github.com/apache/couchdb-docker/assets/45699995/28ecfd38-34d7-423f-993f-d4e8b897c74d)
   
   Spike in memory consumption after running _bulk_docs of ~500kb (2700 docs) 
for 5 databases:
   
![image](https://github.com/apache/couchdb-docker/assets/45699995/1b961953-5202-493b-8709-7b244e7059dc)
   
   ## Expected Behavior
   500kb of docs should not spike up memory by 1Gigs?
   
   ## Current Behavior
   Memory spikes up by about 1GB for 500kb of documents posted via _bulk_docs
   
   ## Steps to Reproduce (for bugs)
   1. Create mock_documents.json with ~2700 documents
   2. Create database using curl.
   3. POST documents using _bulk_docs.
   4. Check memory consumption of the container.
   Ex:
   ```
   curl -X PUT  http://test:test@localhost:5984/testbuild1
   curl -X POST -H "Content-Type: application/json"  
http://test:test@localhost:5984/testbuild1/_bulk_docs -d @mock_documents.json
   ```
   
   ## Context
   We have a process that creates 2700 docs (~500kb total) with new database 
every day. The high memory consumption increases every day and the container 
stops and restarts once it reaches the peak.
   
   ## Your Environment
   Local docker container and kubernetes pods.
   * Version used: 3.3.3, 3.2.2, 3.0.1, 2.x
   * Browser Name and version: any
   * Operating System and version (desktop or mobile): Desktop MacOS


-- 
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-unsubscr...@couchdb.apache.org.apache.org

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

Reply via email to