Redis status and statistics database connection broken would cause 99% cpu usage
Open
Nobody has claimed this yet.
auto-migrated
Priority-Medium
Type-Defect
- Dominant language
- C
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
What steps will reproduce the problem?
1. Start a redis-server in localhost, as turn-server's user-statsdb:
./redis-server &
2. Start turn-server with statsdb enabled:
./turnserver -p 10001 -L 10.10.10.15 -a -f -v --no-cli -r localhost -O
port=6379
3. Kill or restart the redis-server started in "step 1":
kill
4. run top command, watch the cpu usage of turn-server:
top
What is the expected output? What do you see instead?
Expected output:
Turn server runs normally, and cpu usage is low.
Real output:
The cpu usage is over 99% per thread:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
30877 xxxxxxxx 20 0 696m 18m 2424 R 99.4 0.5 0:22.79 turnserver
30876 xxxxxxxx 20 0 696m 18m 2424 R 99.1 0.5 0:22.80 turnserver
30878 xxxxxxxx 20 0 696m 18m 2424 R 99.1 0.5 0:22.72 turnserver
What version of the product are you using? On what operating system?
Version:
Version Coturn-4.4.5.1 'Ardee West'
Operating system:
Linux tmpserver 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux
Please provide any additional information below.
Original issue reported on code.google.com by huxinb...@gmail.com on 4 May 2015 at 1:43
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the listed turnserver and redis-server commands, then inspect the Redis statistics-database connection handling in the C code. Restarting or killing Redis should not make turnserver consume nearly 100% CPU per thread; verify the behavior with top after the connection is lost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, redis
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100