-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kafka restart then sarama consumer has very high cpu #849
Comments
You can set |
@eapache sorry my fault! i forgot set sarama.Logger... |
I encountered the same problem; the log is below,but no more information [kafka] 11:03:55.058752 client.go:107: Initializing new client |
@gdutliuyun827 that version of sarama is older, and the bug you are seeing is probably #693. |
upgrade the lib No longer appear, thanks! |
Awesome ✨ |
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Sarama Version: Version 1.11.0 (2016-12-20)
Kafka Version: 0.8.22
Go Version: 1.7.3
Configuration
What configuration values are you using for Sarama and Kafka?
default consumer configuration
Logs
15:38:05 clock_gettime(CLOCK_MONOTONIC, {17385743, 235245143}) = 0
15:38:05 futex(0xa7c358, FUTEX_WAIT, 0, {4, 974182315}) = -1 ETIMEDOUT (Connection timed out)
15:38:10 clock_gettime(CLOCK_MONOTONIC, {17385748, 213971600}) = 0
15:38:10 futex(0xa7d510, FUTEX_WAIT, 0, NULL) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 183737890}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 184469516}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 184600796}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 184784901}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 185386391}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 185642099}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 185759319}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 186226747}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 186733242}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 187221431}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 187472697}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 187833118}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 188202916}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 188411127}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 188785893}) = 0
15:38:10 clock_gettime(CLOCK_REALTIME, {1489995490, 189176483}) = 0
ps aux |grep xxx
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19515 ecuser 20 0 271m 4760 1796 R 23.6 0.3 124:33.53 ecwebrest
Problem Description
when kafka restsart Sarama client has very high cpu , it's seems that sarama don't deal reconnect kafka!
normal strace log
17:49:48 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:48 epoll_wait(5, {}, 128, 0) = 0
17:49:48 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:49 epoll_wait(5, {}, 128, 0) = 0
17:49:49 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:49 epoll_wait(5, {}, 128, 0) = 0
17:49:49 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:49 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:49 epoll_wait(5, {}, 128, 0) = 0
17:49:49 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:50 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:50 epoll_wait(5, {}, 128, 0) = 0
17:49:50 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:50 epoll_wait(5, {}, 128, 0) = 0
17:49:50 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:50 epoll_wait(5, {}, 128, 0) = 0
17:49:50 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:51 epoll_wait(5, {}, 128, 0) = 0
17:49:51 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:51 epoll_wait(5, {}, 128, 0) = 0
17:49:51 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:51 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:51 epoll_wait(5, {}, 128, 0) = 0
17:49:51 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:52 epoll_wait(5, {}, 128, 0) = 0
17:49:52 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:52 epoll_wait(5, {}, 128, 0) = 0
17:49:52 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:52 epoll_wait(5, {}, 128, 0) = 0
17:49:52 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:52 epoll_wait(5, {}, 128, 0) = 0
17:49:52 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:53 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:53 epoll_wait(5, {}, 128, 0) = 0
17:49:53 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:53 epoll_wait(5, {}, 128, 0) = 0
17:49:53 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:53 epoll_wait(5, {}, 128, 0) = 0
17:49:53 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:53 epoll_wait(5, {}, 128, 0) = 0
17:49:53 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:54 epoll_wait(5, {}, 128, 0) = 0
17:49:54 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:54 epoll_wait(5, {{EPOLLOUT, {u32=2524166296, u64=140263271151768}}}, 128, 0) = 1
17:49:54 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:54 futex(0xa79510, FUTEX_WAIT, 0, NULL) = 0
17:49:54 epoll_wait(5, {}, 128, 0) = 0
i think sarama is dead locked
The text was updated successfully, but these errors were encountered: