5
|
|
fix the stuck problem when the clients' concurrency too much
While doing stress testing, 5000 connections execute a short query through proxy constantly,the proxy would have no response after a while. If strace the proxy process, and all the event threads are always logged like this : sendto(4, ".", 1, 0, NULL, 0 <unfinished ...> The problem come from the function chassis_event_add, and there are too much event when the clients' concurrency too much. Now I modified the implement of chassis_event_add by using random num to determin the handle thread's event_base. Moreover, the event base of libevent must be thread-safe. So the proxy should depend on libevent which version no less than 2.0(event base is thread safe https://raw.github.com/libevent/libevent/patches-2.0/whatsnew-2.0.txt).
The problem is critical, and see also in http://bugs.mysql.com/bug.php?id=63908&error=no http://forums.mysql.com/read.php?146,433299,433299#msg-433299
|
vin |
12 years ago
|
|
|
4
|
|
|
vin |
12 years ago
|
|
|
3
|
|
|
vin |
12 years ago
|
|
|
2
|
|
|
vin |
12 years ago
|
|
|
1
|
|
|
vin |
12 years ago
|
|
|