You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "benel (via GitHub)" <gi...@apache.org> on 2023/11/15 12:59:06 UTC
[I] Opening Fauxton causes 200-300% CPU usage for several minutes [couchdb]
benel opened a new issue, #4850:
URL: https://github.com/apache/couchdb/issues/4850
On a production server where multiple instances of CouchDB were running fine for months, all of a sudden, most of HTTP requests (even opening Fauxton home with a browser) start to cause very high CPU consumption for several minutes.
## Description
To isolate the problem, on this server, I stopped and removed all CouchDB containers and succeeded in reproducing the problem with a blank CouchDB container (with no linked data volumes, no configuration apart from admin login and password).
it appears that apart from several URIs (those with only one segment), every other cause `beam.smp` to use 100, 200, 300% of CPU. The connection seems to remain open. In the logs, there are neither errors nor notices for the failed requests.
## Steps to Reproduce
Steps needed to reproduce the problem on the failing production server:
1. Launch a CouchDB instance
docker run --name couchdb1 --publish 5984:5984 --detach --env COUCHDB_USER=admin --env COUCHDB_PASSWORD=*** couchdb
2. Create users database (to remove related notices from the logs)
curl -X PUT admin:***@localhost:5984/_users
3. Follow logs :
docker logs couchdb1 --follow
4. Get Fauxton HTML index
curl localhost:5984/_utils/
5. Get one of the files refered in the HTML index file
curl localhost:5984/_utils/dashboard.assets/css/styles.5bda604c70f688307c36.css
- The CSS displayed by `curl` is incomplete.
- `curl` waits for HTTP request to be completed.
- The logs record no `GET /_utils/dashboard.assets/css/styles.5bda604c70f688307c36.css 200 ok`
- The CPU usage of `beam.smp` is above 150% for several minutes.
## Expected Behaviour
- The complete CSS should be got by `curl`.
- The HTTP request should close with 200 status.
- The logs should record `GET /_utils/dashboard.assets/css/styles.5bda604c70f688307c36.css 200 ok`
- The CPU usage of `beam.smp` should be less than 10%.
## Your Environment
Server uses an old but maintained LTS linux kernel.
Output of `http://localhost:5984/` is:
```json
{"couchdb":"Welcome","version":"3.3.2","git_sha":"11a234070","uuid":"5d176bc61132b6cffe23d027dd5b6832","features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
```
--
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
Re: [I] Opening Fauxton causes 200-300% CPU usage for several minutes [couchdb]
Posted by "benel (via GitHub)" <gi...@apache.org>.
benel commented on issue #4850:
URL: https://github.com/apache/couchdb/issues/4850#issuecomment-1812673535
Really weird. The problem disappeared after restarting the OS.
Could this problem be related to a sort of system resource leak?
However I did not found any (memory, open files...).
--
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
Re: [I] Opening Fauxton causes 200-300% CPU usage for several minutes [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #4850:
URL: https://github.com/apache/couchdb/issues/4850#issuecomment-1812764631
It certainly didn't sound like couchdb or erlang behaviour I've ever seen. resource exhaustion would be a good bet.
--
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
Re: [I] Opening Fauxton causes 200-300% CPU usage for several minutes [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on issue #4850:
URL: https://github.com/apache/couchdb/issues/4850#issuecomment-1842035719
@benel I wonder if updating to 3.3.3 would change the situation. We upgraded the Erlang version and also updated a few vm.args (Erlang VM) config settings that might make it work better in a containerized environment:
https://github.com/apache/couchdb-docker/blob/58910ed097489dc588b2a87592406f8faa1bdadf/3.3.3/vm.args#L39-L44
--
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
Re: [I] Opening Fauxton causes 200-300% CPU usage for several minutes [couchdb]
Posted by "benel (via GitHub)" <gi...@apache.org>.
benel commented on issue #4850:
URL: https://github.com/apache/couchdb/issues/4850#issuecomment-1854151758
Thank you Robert and Nick. I upgraded to 3.3.3.
I will tell you if such a resource exhaustion occurs again.
--
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
Re: [I] Opening Fauxton causes 200-300% CPU usage for several minutes [couchdb]
Posted by "benel (via GitHub)" <gi...@apache.org>.
benel closed issue #4850: Opening Fauxton causes 200-300% CPU usage for several minutes
URL: https://github.com/apache/couchdb/issues/4850
--
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