Skip to content

Commit

Permalink
修改Redis注册中心宕机时,应用占用cpu高的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeCao committed Feb 26, 2013
1 parent 3416402 commit 6ebd624
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,8 @@ public void run() {
}
} catch (Throwable t) { // 重试另一台
logger.warn("Failed to subscribe service from redis registry. registry: " + entry.getKey() + ", cause: " + t.getMessage(), t);
// 如果在单台redis的情况下,需要休息一会,避免空转占用过多cpu资源
sleep(reconnectPeriod);
}
}
} catch (Throwable t) {
Expand Down

0 comments on commit 6ebd624

Please sign in to comment.