`
langzhe
  • 浏览: 279036 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

tsung 压力测 试遇到的几个问题

阅读更多

 

注册 用户 超过  130000 178864
    设备              156584 
1.               
   测试关于“汉字”更新数据
后台抛出 =INFO REPORT==== 2010-10-25 18:07:47 ===
D(<0.1906.0>:ejabberd_odbc:416) : MySQL, Send query
["UPDATE vendors SET vendorname='",[20013],"' WHERE vendorid='","37","';"]
=INFO REPORT==== 2010-10-25 18:07:52 ===
D(<0.1906.0>:ejabberd_odbc:416) : MySQL, Send query
"rollback;"

解决方法: [20013] 是为调用了xmerl:xmerl_scan:string/2 返回的,只好从编码上入手,但 很不能理解 如果 下面参数 S 已经是UTF8 了在执行下面操作后 又进行了编码(为什么再次编码,此现象只出现在汉字上面)。所以只好在针对xmerl_scan:string/2的返回值进行编码,而不能写成通用的方法。 如[233,223,222] 执行下面操作后成了 [228,123,345,238,222,133](此数据是说明问题随便写的) > > + UTF8Binary = unicode:characters_to_binary(S, utf8, utf8), > > + UTF8Str = binary_to_list(UTF8Binary),

2.单个 虚拟机 测试( <client host="client-3.langzhelabdns.com" use_controller_vm="true" maxusers="60000"/>
)
解决方法:以下问题 修改ulimit -n 102400参数解决

INFO REPORT==== 1-Nov-2010::13:46:29 ===
         ts_launcher:(5:<0.84.0>) Activate launcher (60000 users) in 10002 msec

=INFO REPORT==== 1-Nov-2010::13:49:47 ===
           ts_client:(3:<0.12537.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: etimedout

=INFO REPORT==== 1-Nov-2010::13:49:47 ===
           ts_client:(3:<0.12536.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: etimedout

=INFO REPORT==== 1-Nov-2010::13:49:47 ===
           ts_client:(3:<0.12535.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: etimedout


日志---:






           ts_client:(3:<0.6577.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: system_limit

=INFO REPORT==== 1-Nov-2010::10:35:44 ===
           ts_client:(3:<0.4203.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: system_limit

=INFO REPORT==== 1-Nov-2010::10:35:44 ===
           ts_client:(5:<0.4203.0>) Pending transactions: [{tr_device_register,
                                                            {1288,578941,
                                                             906458}}], compute transaction time

=INFO REPORT==== 1-Nov-2010::10:35:44 ===
           ts_client:(3:<0.4378.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: system_limit

=INFO REPORT==== 1-Nov-2010::10:35:44 ===
           ts_client:(5:<0.4378.0>) Pending transactions: [{tr_device_register,
                                                            {1288,578941,
                                                             906438}}], compute transaction time

=INFO REPORT==== 1-Nov-2010::10:35:44 ===
           ts_client:(3:<0.5622.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: system_limit

=INFO REPORT==== 1-Nov-2010::10:35:44 ===
           ts_client:(3:<0.4033.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: system_limit

=INFO REPORT==== 1-Nov-2010::10:35:44 ===






Error: econnreset
 
           ts_client:(3:<0.32258.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: econnrefused

=INFO REPORT==== 1-Nov-2010::10:41:03 ===
           ts_client:(3:<0.27051.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: econnrefused

=INFO REPORT==== 1-Nov-2010::10:41:03 ===
           ts_client:(5:<0.27051.0>) Pending transactions: [{tr_user_register,
                                                             {1288,579203,
                                                              9045}}], compute transaction time

=INFO REPORT==== 1-Nov-2010::10:41:03 ===
           ts_client:(3:<0.31393.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: econnrefused

3. ------------------------------------------------
 根据上面出现的情况 调整ulimit参数后,tsung日志出现  etimedout (ssh验证 tsung监听 )会出现此问题
参见 http://www.iteye.com/topic/573238部分解释

=INFO REPORT==== 1-Nov-2010::13:49:47 ===
           ts_client:(3:<0.12532.0>) (Re)connect from 0.0.0.0 to testrsa.langzhelabdns.com:5280, Error: etimedout
解决方法 配置ssh 信任

4. ----死锁 ------------------ -------------代码中出现了for update引起 去掉就OK了-- ---------------
 =INFO REPORT==== 2010-11-01 10:22:06 ===
 15403 D(<0.517.0>:ejabberd_http:323) : ["user","register"] matches ["user",
 15404                                                               "register"]
 15405 
 15406 =INFO REPORT==== 2010-11-01 10:22:06 ===
 15407 D(<0.259.0>:ejabberd_odbc:420) : MySQL, Send query
 15408 ["SELECT vendorid FROM vendors WHERE vendorname = '","test","' FOR UPDATE;"]
 15409 
 15410 
 15411 =INFO REPORT==== 2010-11-01 10:22:06 ===
 15412 D(<0.247.0>:ejabberd_odbc:420) : MySQL, Send query
 15413 ["SELECT vendorid FROM vendors WHERE vendorname = '","test","' FOR UPDATE;"]
 15414 
 15415 
 15416 =INFO REPORT==== 2010-11-01 10:22:06 ===
 15417 D(<0.437.0>:mod_langzhe_device_register:71) : transactionResult = {aborted,
 15418                                                                 {{badmatch,
 15419                                                                   {error,
 15420                                                                    "#40001Deadlock found when trying to get lock; try restarting transaction"}},
 15421                                                                  [{mod_langzhe_basic,
 15422                                                                    add_device_type,
 15423                                                                    2},
 15424                                                                   {mod_langzhe_device_register,
 15425                                                                    '-process/2-fun-0-',
 15426                                                                    7},
 15427                                                                   {ejabberd_odbc,
 15428                                                                    outer_transaction,
 15429                                                                    3},
 15430                                                                   {ejabberd_odbc,
 15431                                                                    session_established,
 15432                                                                    3},
 15433                                                                   {p1_fsm,
 15434                                                                    handle_msg,
 15435                                                                    10},
                             

5.----------- 注册用户 40080-  -------------
Mon Nov  1 16:05:19 2010
Slogan: eheap_alloc: Cannot allocate 729810240 bytes of memory (of type "heap").
System version: Erlang R13B03 (erts-5.7.4) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:true]
Compiled: Fri Oct 15 14:49:18 2010
Atoms: 15554
=memory
total: 1802636424
processes: 1646297908
processes_used: 1645947788
system: 156338516
atom: 710173
atom_used: 696317
binary: 235232
code: 6574357
ets: 5148228
=hash_table:atom_tab
=======================
Mon Nov  1 15:52:53 2010
Slogan: eheap_alloc: Cannot allocate 912262800 bytes of memory (of type "heap").
System version: Erlang R13B03 (erts-5.7.4) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:true]
Compiled: Fri Oct 15 14:49:18 2010
Atoms: 15554
=memory
total: 2105409384
processes: 2059069028
processes_used: 2058770452
system: 46340356
atom: 710173
atom_used: 696317
binary: 207192
code: 6574357
ets: 5148596
=hash_table:atom_tab
size: 9643
used: 7694
objs: 15554
depth: 8
-----------------------------------------
=erl_crash_dump:0.1注册用户数 32874     600s 300/s  服务器抛出 错误时 物理内存 被占用81% (2G内存)
912262800/1024/1024 > 0.19*2*1024(870>389 显然 是内存不足)

Mon Nov  1 16:30:25 2010
Slogan: eheap_alloc: Cannot allocate 912262800 bytes of memory (of type "heap").
System version: Erlang R13B03 (erts-5.7.4) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:true]
Compiled: Fri Oct 15 14:49:18 2010
Atoms: 15554
=memory
total: 2238866320
processes: 2077803940
processes_used: 2077676852
system: 161062380
atom: 710173
atom_used: 696317
binary: 222712
code: 6574357
ets: 5148340
=hash_table:atom_tab
size: 9643
used: 7694
objs: 15554
depth: 8
解决方法
 分析后发现是日志级别引起,设为info就OK 
六、-----------FSM limit reached (<0.255.0>): {max_queue,1003}--------------------------------------------
=INFO REPORT==== 2010-11-01 20:30:30 ===
I(<0.27300.0>:ejabberd_http:137) : started: {gen_tcp,#Port<0.30873>}

=INFO REPORT==== 2010-11-01 20:30:30 ===
I(<0.384.0>:ejabberd_listener:234) : (#Port<0.30874>) Accepted connection {{192,168,0,223},40244} -> {{192,168,0,223},5280}

=INFO REPORT==== 2010-11-01 20:30:30 ===
I(<0.27301.0>:ejabberd_http:137) : started: {gen_tcp,#Port<0.30874>}

=INFO REPORT==== 2010-11-01 20:30:30 ===
I(<0.384.0>:ejabberd_listener:234) : (#Port<0.30875>) Accepted connection {{192,168,0,223},54723} -> {{192,168,0,223},5280}

=INFO REPORT==== 2010-11-01 20:30:30 ===
I(<0.27302.0>:ejabberd_http:137) : started: {gen_tcp,#Port<0.30875>}

=INFO REPORT==== 2010-11-01 20:30:30 ===
I(<0.384.0>:ejabberd_listener:234) : (#Port<0.30876>) Accepted connection {{192,168,0,223},47419} -> {{192,168,0,223},5280}

=ERROR REPORT==== 2010-11-01 20:30:30 ===
FSM limit reached (<0.255.0>): {max_queue,1003}

=INFO REPORT==== 2010-11-01 20:30:30 ===
I(<0.257.0>:ejabberd_odbc:526) : Closing connection #Port<0.3650>: ok


=INFO REPORT==== 2010-11-01 20:30:30 ===
I(<0.27303.0>:ejabberd_http:137) : started: {gen_tcp,#Port<0.30876>}

=INFO REPORT==== 2010-11-01 20:30:30 ===
I(<0.384.0>:ejabberd_listener:234) : (#Port<0.30877>) Accepted connection {{192,168,0,223},60273} -> {{192,168,0,223},5280}

=INFO REPORT==== 2010-11-01 20:30:33 ===
I(<0.27307.0>:ejabberd_http:137) : started: {gen_tcp,#Port<0.30877>}

=INFO REPORT==== 2010-11-01 20:30:34 ===
I(<0.384.0>:ejabberd_listener:234) : (#Port<0.30878>) Accepted connectio       
解决方法 参见 : http://langzhe.iteye.com/admin/blogs/801942
    

七、-------------------------------------
=INFO REPORT==== 2010-11-02 08:57:24 ===
I(<0.384.0>:ejabberd_listener:246) : (#Port<0.4265>) Failed TCP accept: emfile
解决方法: vi /etc/ejabberd/ejabberdctl.cfg 修改
ERL_PROCESSES=250000
ERL_MAX_PORTS=320000
参数和ulimit -n 参数
enfile问题参考 http://www.netadmintools.com/art295.html

八、-------------------------------------
方法1 修改maxusers参数<client host="client-3.langzhelabdns.com" use_controller_vm="true" maxusers="6000000"/>
方法2 修改use_controller_vm参数 <client host="client-3.langzhelabdns.com" use_controller_vm="faluse"/>
"Maximum number of concurrent users in a single VM reached and 'use_controller_vm' is true, can't start new beam !!! Check 'maxusers' value in <client> configuration.~n"

九、-----------ID 越过---没有生成 vendordid 为64的记录----------------------
 select * from vendors where vendorid like'6_' order by vendorid;
+----------+------------+
| vendorid | vendorname |
+----------+------------+
|       60 | test160    |
|       61 | test161    |
|       62 | test162    |
|       63 | test163    |
|       65 | test164    |‪
|       66 | test165    |
|       67 | test166    |
|       68 | test167    |
|       69 | test168    |
+----------+------------+

 157 | test1157   |
|      159 | test1158   |
|      160 | test1159 

======下面两个问题还没有解决============
十一、--------------------------
=INFO REPORT==== 2010-11-03 17:42:19 ===
I(<0.20211.0>:ejabberd_http:137) : started: {gen_tcp,#Port<0.23590>}

=ERROR REPORT==== 2010-11-03 17:42:19 ===
** State machine <0.235.0> terminating 
** Last message in was {'$gen_sync_event',
                           {<0.7013.0>,#Ref<0.0.0.125463>},
                           {sql_cmd,
                               {sql_query,
                                   ["SELECT keyt FROM langzhe_vendor_key WHERE vendor = '",
                                    "test","' and version = '","1","';"]}}}
** When State == session_established
**      Data  == {state,<0.236.0>,mysql,30000,"testrsa.langzhelabdns.com",
                        1000000000000,
                        {0,{[],[]}}}
** Reason for termination = 
** timeout

==> ejabberd.log <==
                           {sql_cmd,
                               {sql_query,
                                   ["SELECT keyt FROM langzhe_vendor_key WHERE vendor = '",
                                    "test","' and version = '","1","';"]}}}
** When State == session_established
**      Data  == {state,<0.236.0>,mysql,30000,"testrsa.langzhelabdns.com",
                        1000000000000,
                        {0,{[],[]}}}
** Reason for termination = 
** timeout

十二、---------------------mysql connection failed timeout---------------
     5 =INFO REPORT==== 2010-11-05 16:23:21 ===
     6 I(<0.247.0>:ejabberd_odbc:212) : mysql connection failed:
     7 ** Reason: "timed out"
     8 ** Retry after: 30 seconds
     9 
    10 =ERROR REPORT==== 2010-11-05 16:23:21 ===
    11 E(<0.246.0>:ejabberd_odbc:528) : mysql_conn: Failed connecting to "192.168.0.223":3306 : {error,
    12                                                                                           "timeout"}
    13 
    14 =INFO REPORT==== 2010-11-05 16:23:21 ===
    15 I(<0.244.0>:ejabberd_odbc:212) : mysql connection failed:
    16 ** Reason: "timed out"
    17 ** Retry after: 30 seconds
    18 
    19 =ERROR REPORT==== 2010-11-05 16:23:21 ===
    20 W(<0.244.0>:ejabberd_odbc:281) : unexpected info in connecting: {mysql_conn,
    21                                                                  <0.246.0>,
    22                                                                  {error,
    23                                                                   connect_failed}}
    24 
    25 =ERROR REPORT==== 2010-11-05 16:23:21 ===
    26 E(<0.243.0>:ejabberd_odbc:528) : mysql_conn: Failed connecting to "192.168.0.223":3306 : {error,
    27                                                                                           "timeout"}
    28 
    29 =INFO REPORT==== 2010-11-05 16:23:21 ===
    30 I(<0.241.0>:ejabberd_odbc:212) : mysql connection failed:
    31 ** Reason: "timed out"
    32 ** Retry after: 30 seconds
    33 
    34 =ERROR REPORT==== 2010-11-05 16:23:21 ===
    35 W(<0.241.0>:ejabberd_odbc:281) : unexpected info in connecting: {mysql_conn,
    36                                                                  <0.243.0>,
    37                                                                  {error,
 

 

0
0
分享到:
评论

相关推荐

    MQTT压力测试之Tsung的使用

    MQTT压力测试之Tsung的使用 MQTT压力测试之Tsung的使用

    Tsung_测试XMPP_安装使用说明

    tsung是用erlang开发的一款简单易用的压力测试工具,目前仅支持linux各版本系统安装,有tar.gz和deb两种安装文件, 目前我们测试用的是CentOS或RedHat两种操作系统,因此选择tar.gz安装文件,总的来说tsung工具有...

    tsung里面测试websocket的插件

    tsung里面测试websocket的插件含 websocket.xml 等

    tsung高并发测试工具搭建(自己亲测,详细的一逼)

    tsung高并发测试工具搭建(自己亲测,详细的一逼),改文档是自己一步一步摸索出来的,主要是安装tsung整个过程很详细,搭过的人,知道tsung的搭建依赖很恶心,不是一时半会能搞出来的

    tsung用户手册 linux

    压力测试 压力测试 tsung linux

    tsung测试总结

    tsung 测试 java erlang

    Tsung负载测试tigase

    tsung是一个非常好用的压力测试软件,基于erlang语言,支持多种协议如xmpp,http,mysql,支持集群,高效率,可以用一台普通的机器压垮几台性能强大的服务器。 针对消息通知服务xmpp服务器,可以用tsung来测试消息...

    Tsung安装使用详细解说

    Tsung安装使用的详细解说,主要针对xmpp的服务端(比如openfire的测试),编写测试场景的脚本配置详细说明。本人使用的是ubuntu操作系统、Tsung1.4.1

    tsung+erlang包

    tsung+erlang测试工具,初学者应用必备,内部放置tsung源程序文件和erlang文件

    tsung脚本及说明

    tsung的测试脚本,包含发送单人消息,群组消息,获取花名册等

    Openfire 3.9.3 Load Test Tsung配置xml

    Openfire 3.9.3 Load Test Tsung配置xml,10万用户下集群测试的Tsung压力测试工具的jabber_cluster.xml,session 5分钟

    tsung:性能测试工具

    tsung:性能测试工具

    tsung最新用户手册

    tsung最新用户手册,包含HTTP, WebDAV, SOAP, PostgreSQL, MySQL, LDAP, and Jabber/XMPP servers压力测试模版,错误说明等。

    tsung-1.3.3

    tsung安装包,linux下进行压力测试的工具

    tsung安装使用

    关于tsung工具的安装步骤以及使用过程中会遇到的常见问题解答

    tsung安装使用说明

    tsung安装使用,参数说明,模拟openfire注册用户,模拟用户openfire登录、状态更改、发送消息,对openfire长时间压力测试

    tsung1.6.0

    tsung为一个开源的多协议分布式负载测试工具,使用erlang语言开发的。具体安装使用可以参考URL:http://www.51ste.com/share/det-222.html

    Tsung 安装使用

    性能测试工具。 类似Loadrunner,比loadrunner给力。

    tsung-1.5.1.tar.gz

    一款压力测试工具,测试openfire非常好用有效,结果图像也非常直观。

    Wreb应用系统的自动化测试解决75-案 (2010年)

    测试自动化管理系统用来控制整个测试过程和项目的进展,功能方面的自动化测试主要采用关键字驱动的web系统测试框架watij来实现,而性能测试的自动化则利用分布式的测试工具Tsung自动化测试不能完全取代人工测试,...

Global site tag (gtag.js) - Google Analytics