开行网上一次偶然的经历
时间:2009-05-31 来源:zhucj
“开心网”这个东西,我想年轻人都不会陌生,现在搞的很火。其实它流行了一段时间了,不过我是近两三天才在上面,应我们team的QA senior manager的邀请,搞了个账号,看了一圈之后,从技术角度来说,其实也没有多少新鲜东西。不过呢,“开心农场”和“超级大亨”这些个application倒是抓住了人的某些心理,虽然我很清楚其实升级无非就是我的账户对应的那条数据库记录的某个字段被update了一下,但有时就是会想着我要去升级,在我的农场里种更多更好的东西,事后一想呢,也挺无聊的,但当时就是醒不不过来。
有一次在农场里种菜的时候,又刷了一下网页,结果就看到了以下内容:
Exception Object ( [message:protected] => ErrorMsg:Can not connect to MySQL server:10.65.133.172 Error: Too many connections Errno: 1040 [string:private] => [code:protected] => 1040 [file:protected] => /data/htdocs/kxfarm/myfarm/framework/database/drivers/MooMySQL.class.php [line:protected] => 274 [trace:private] => Array ( [0] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/drivers/MooMySQL.class.php [line] => 38 [function] => errorMsg [class] => MooMySQL [type] => -> [args] => Array ( [0] => Can not connect to MySQL server:10.65.133.172 ) ) [1] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/ConnectionManager.class.php [line] => 44 [function] => connect [class] => MooMySQL [type] => -> [args] => Array ( [0] => 10.65.133.172 [1] => myfarm [2] => xwAppU2rAmmRpR3v [3] => myfarm [4] => [5] => UTF8 ) ) [2] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/ConnectionManager.class.php [line] => 77 [function] => createConnection [class] => ConnectionManager [type] => -> [args] => Array ( [0] => 10.65.133.172 ) ) [3] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/ConnectionManager.class.php [line] => 100 [function] => getWriteConnection [class] => ConnectionManager [type] => -> [args] => Array ( ) ) [4] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/DBHelper.class.php [line] => 263 [function] => getReadConnection [class] => ConnectionManager [type] => -> [args] => Array ( ) ) [5] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/DBHelper.class.php [line] => 69 [function] => getReadConn [class] => DBHelper [type] => -> [args] => Array ( ) ) [6] => Array ( [file] => /data/htdocs/kxfarm/myfarm/api/model/UserAccount.class.php [line] => 130 [function] => resultFirst [class] => DBHelper [type] => -> [args] => Array ( [0] => select farmuid from user_account where uid = 716828267 ) ) [7] => Array ( [file] => /data/htdocs/kxfarm/myfarm/api/model/cache/UserAccountCache.class.php [line] => 265 [function] => getUserFarmuid [class] => UserAccount [type] => -> [args] => Array ( [0] => 716828267 ) ) [8] => Array ( [file] => /data/htdocs/kxfarm/myfarm/api/model/cache/UserAccountCache.class.php [line] => 282 [function] => getUserFarmuid [class] => UserAccountCache [type] => -> [args] => Array ( [0] => 716828267 ) ) [9] => Array ( [file] => /data/htdocs/kxfarm/myfarm/kaixin/control/farm_flash.php [line] => 36 [function] => getExtendedAccount [class] => UserAccountCache [type] => -> [args] => Array ( [0] => 716828267 ) ) [10] => Array ( [file] => /data/htdocs/kxfarm/myfarm/kaixin/index.php [line] => 39 [args] => Array ( [0] => /data/htdocs/kxfarm/myfarm/kaixin/control/farm_flash.php ) [function] => include ) ) ) 初始化用户账号失败
从这个Exception当中,我们可以看到很多信息,数据库服务器的IP地址:10.65.133.172,所用的数据库:MySQL,文件目录层次结果:/data/htdocs/kxfarm/myfarm/kaixin/control/farm_flash.php,这个Exception的根源好像是连接数达到上限了:Too many connections Errno ...... 我没深入地去看,不想去揣测开心网的architecture
有一次在农场里种菜的时候,又刷了一下网页,结果就看到了以下内容:
Exception Object ( [message:protected] => ErrorMsg:Can not connect to MySQL server:10.65.133.172 Error: Too many connections Errno: 1040 [string:private] => [code:protected] => 1040 [file:protected] => /data/htdocs/kxfarm/myfarm/framework/database/drivers/MooMySQL.class.php [line:protected] => 274 [trace:private] => Array ( [0] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/drivers/MooMySQL.class.php [line] => 38 [function] => errorMsg [class] => MooMySQL [type] => -> [args] => Array ( [0] => Can not connect to MySQL server:10.65.133.172 ) ) [1] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/ConnectionManager.class.php [line] => 44 [function] => connect [class] => MooMySQL [type] => -> [args] => Array ( [0] => 10.65.133.172 [1] => myfarm [2] => xwAppU2rAmmRpR3v [3] => myfarm [4] => [5] => UTF8 ) ) [2] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/ConnectionManager.class.php [line] => 77 [function] => createConnection [class] => ConnectionManager [type] => -> [args] => Array ( [0] => 10.65.133.172 ) ) [3] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/ConnectionManager.class.php [line] => 100 [function] => getWriteConnection [class] => ConnectionManager [type] => -> [args] => Array ( ) ) [4] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/DBHelper.class.php [line] => 263 [function] => getReadConnection [class] => ConnectionManager [type] => -> [args] => Array ( ) ) [5] => Array ( [file] => /data/htdocs/kxfarm/myfarm/framework/database/DBHelper.class.php [line] => 69 [function] => getReadConn [class] => DBHelper [type] => -> [args] => Array ( ) ) [6] => Array ( [file] => /data/htdocs/kxfarm/myfarm/api/model/UserAccount.class.php [line] => 130 [function] => resultFirst [class] => DBHelper [type] => -> [args] => Array ( [0] => select farmuid from user_account where uid = 716828267 ) ) [7] => Array ( [file] => /data/htdocs/kxfarm/myfarm/api/model/cache/UserAccountCache.class.php [line] => 265 [function] => getUserFarmuid [class] => UserAccount [type] => -> [args] => Array ( [0] => 716828267 ) ) [8] => Array ( [file] => /data/htdocs/kxfarm/myfarm/api/model/cache/UserAccountCache.class.php [line] => 282 [function] => getUserFarmuid [class] => UserAccountCache [type] => -> [args] => Array ( [0] => 716828267 ) ) [9] => Array ( [file] => /data/htdocs/kxfarm/myfarm/kaixin/control/farm_flash.php [line] => 36 [function] => getExtendedAccount [class] => UserAccountCache [type] => -> [args] => Array ( [0] => 716828267 ) ) [10] => Array ( [file] => /data/htdocs/kxfarm/myfarm/kaixin/index.php [line] => 39 [args] => Array ( [0] => /data/htdocs/kxfarm/myfarm/kaixin/control/farm_flash.php ) [function] => include ) ) ) 初始化用户账号失败
从这个Exception当中,我们可以看到很多信息,数据库服务器的IP地址:10.65.133.172,所用的数据库:MySQL,文件目录层次结果:/data/htdocs/kxfarm/myfarm/kaixin/control/farm_flash.php,这个Exception的根源好像是连接数达到上限了:Too many connections Errno ...... 我没深入地去看,不想去揣测开心网的architecture
相关阅读 更多 +