/data/log/logger/logger.2014-11-18-21.log:2014-11-18 21:56:39.370 INFO [gameScheduler-1][LoggerManager.java:45] - 文件处理开始 num=69663
/data/log/logger/logger.2014-11-18-22.log:2014-11-18 22:19:33.281 INFO [gameScheduler-1][LoggerManager.java:58] - 文件处理完毕 num=69663 failed=0,exec=1373910.9 ms interval=19.722246 ms
这是历史以来执行最长的一次,
69663条日志,总共执行了23分钟
上报速度低于日志产生速度--> 多线程,修改调度时间频率
策划数据,有空格,回车导致URL串非法,
批量插库时连接没有释放
减少货币流和道具流的消耗
日志乱码问题,运维终端在初始化后,没有关闭。
infobright 当遇到有Emoji表情字符插入时,会卡住,不抛出异常,导致后续的日志无法再写入,通过show full processlist,会显示system lock的状态
加上对这些日志的过滤吧
// 判别是否包含Emoji表情 private static boolean containsEmoji(String str) { int len = str.length(); for (int i = 0; i < len; i++) { if (isEmojiCharacter(str.charAt(i))) { return true; } } return false; } private static boolean isEmojiCharacter(char codePoint) { return !((codePoint == 0x0) || (codePoint == 0x9) || (codePoint == 0xA) || (codePoint == 0xD) || ((codePoint >= 0x20) && (codePoint <= 0xD7FF)) || ((codePoint >= 0xE000) && (codePoint <= 0xFFFD)) || ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF))); }