Load test using Tsung

Zhenxiang Liang
Added almost 5 years ago


I tried to do load test with Tsung, with following parameter:

  <arrivalphase phase="1" duration="15" unit="minute">
    <users maxnumber="20" interarrival="0.0025" unit="second"></users>

But I meet a problem:

Now all users are registered successfully, the server response 503 service unavailable. I have configured "Linux settings for high load systems".

I have looked at the log. It showed:

2014-04-15 21:21:32.565 [in_4-sess-man] SessionManager.getXMPPResourceConnection() INFO: Message without TO attribute set, don't know what to do wih this: from=c2s@ip-10-164-91-190.ec2.internal/, to=sess-man@ip-10-164-91-190.ec2.internal, DATA=tsung4tsungtsung4, SIZE=172, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set

So my question why this happened and how I can fix this?

Replies (11)


Added by Artur Hefczyc TigaseTeam almost 5 years ago

Do you connect 20 users only to the Tigase server?

I am asking because the log message you gave us usually means the user login rate (inter arrival) is to high and Tigase cannot authenticate all users in time (DB too slow for example), so the users get disconnected before authentication is completed, hence the message.

There might be other reasons for this to happen but we have too little information to guess. You could provide us with a complete tsung config, tigase config, and tigase log file. Also, it would help us if you told us a bit more about software version you use, operating system, DB...

Added by Zhenxiang Liang almost 5 years ago

Yes, I register 20 users to the Tigase server.

I have also tried to set inter arrival to 1 second and 10 seconds, there is still failed registration.

Attached are the complete tsung config, tsung log, tigase config and tigase log file.

For software and hardware:

I used Tigase 5.2.0, Tsung 1.5.1, ubuntu 13.10, mysql 5.6.13.

I used all my hardware in Amazon aws. I use small instance for tigase and micro RDS for database.

Thank you for your time.


Added by Artur Hefczyc TigaseTeam almost 5 years ago

Ok, looking at your Tsung config, I think that interarrival is not a problem. I think the problem might be lack of any thinktime in your connection session. Tsung sends user registration request right after connecting, not sure if it even waits for stream opening response from the XMPP server. I think you should always add some thinktime after connecting, before you do any other actions (registration, login, etc...)

Added by Zhenxiang Liang almost 5 years ago


Thank to your help I set the thinktime and solved the service unavailable problem.

But I find anther problem:

When I set the Tsung config file with interarrival="0.01", all users will be registered successfully as they are in the database.

But If I set the interarrival = "1", there were some error match, the response from the server was unsuccessful registration.

It looks like if I connect all the users to the Tigase server before before any users finished registration, there is not error; but if I connect users to the Tigase server after some users finished registration, then some unsuccessful registration appeared.

Attached are my Tsung config and Tigase config file. Appreciate for your help.


Added by Artur Hefczyc TigaseTeam almost 5 years ago

Hm, this is strange indeed. However, I am afraid config files won't help in this case. This would need to be investigated to find out what is going on. Log files would be essential. Do you see any error/warning messages in Tigase's log file? Maybe Tsung finishes the test before all user are processed?

Added by Zhenxiang Liang almost 5 years ago


Attached are my Tsung config, Tigase config and Tigase log.

I found some Warnings but not know what is means:

  1. SimpleCache.() WARNING: Tigase cache turned off.

Question: Do I need to turn on Tigase Cache? I did not find it in Admin Guide

  1. VHostManager.setProperties() WARNING: {, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}

Question: How can I interpret this warning?

  1. [ConnectionOpenThread] SocketThread.() WARNING: 5 socketReadThreads started.

Question: why socket read threads start is a warning?

  1. WARNING: Dumping server configuration to: etc/

Question: Do I need to pay attention to this warning?

Above are the warning I found, I can also find the server response for unsuccessful registration and before that I found:

None compId match form:

2014-04-18 01:07:41.399 [in_3-message-router] MessageRouter.getLocalComponent() FINEST: None compId matches (fast lookup): c2s@ip-10-164-91-190.ec2.internal/, for map: {pubsub@ip-10-164-91-190.ec2.internal=tigase.pubsub.PubSubComponent@657585e9, cl-comp@ip-10-164-91-190.ec2.internal=tigase.cluster.ClusterConnectionManager@7e1051cb, proxy@ip-10-164-91-190.ec2.internal=tigase.socks5.Socks5ProxyComponent@1fd1cb6a, ws2s@ip-10-164-91-190.ec2.internal=tigase.cluster.WebSocketClientConnectionClustered@ae198ac, basic-conf@ip-10-164-91-190.ec2.internal=tigase.conf.Configurator@2768da73, monitor@ip-10-164-91-190.ec2.internal=tigase.cluster.MonitorClustered@26e027e7, c2s@ip-10-164-91-190.ec2.internal=tigase.cluster.ClientConnectionClustered@4f30c9b8, stats@ip-10-164-91-190.ec2.internal=tigase.stats.StatisticsCollector@7ea69d83, sess-man@ip-10-164-91-190.ec2.internal=tigase.cluster.SessionManagerClustered@5b116e35, bosh@ip-10-164-91-190.ec2.internal=tigase.cluster.BoshConnectionClustered@55a4221f, vhost-man@ip-10-164-91-190.ec2.internal=tigase.cluster.VHostManagerClustered@54ddc83b, muc@ip-10-164-91-190.ec2.internal=tigase.muc.MUCComponent@249a9111, amp@ip-10-164-91-190.ec2.internal=tigase.server.amp.AmpComponent@7cd876c2, cluster-contr@ip-10-164-91-190.ec2.internal=tigase.cluster.ClusterController@13e93c14, s2s@ip-10-164-91-190.ec2.internal=tigase.cluster.S2SConnectionClustered@7b41d5c5, message-archive@ip-10-164-91-190.ec2.internal=tigase.archive.MessageArchiveComponent@62e3d8e8}

I have configured "Linux settings for high load systems" and allocate 1G memory for JVM. Not understand why the registration is not successful.

One more thing is that, I look at the mysql server informations, the number of connections to the mysql database is always low( less that 20). I tried to set --data-repo-pool-size = 50, but it did not work. Could you tell me why it looks like this?

There is a lot questions and thank you.

Added by Zhenxiang Liang almost 5 years ago


Can I ask if there is any update for the problem?

We would like to use tigase server to deploy a chat application. Before that we want to test it.


Added by Artur Hefczyc TigaseTeam almost 5 years ago

I looked in the log files and I cannot see anything wrong. How do you know that there are unsuccessful registration attempts? Do you get any errors or you checked the database? Maybe there were some unsuccessful registration because the account already was in DB before registration attempt?

Next time, you send log files please stop the server remove all logs and start the server so we have clean logs from the server run you have questions about. Otherwise it is impossible to tell which log entries refer to the question you are asking. The WARNINGs you are asking about are printed always after the server start to highlight some important system parameters. It is not something to worry about.

Added by Zhenxiang Liang almost 5 years ago


Thanks for your response.

Attached are the tigase-config, tigase-logs, tsung-logs and tsung-config.

This time I only run tsung with a short time and stop it. As you can see in the tsung.log file, there are "match", which match with error response. And if you take a look at the tsung.dump file, you can see the "Unsuccessful registration attempt", which is also in the tigase.log.0 file.


Added by Artur Hefczyc TigaseTeam almost 5 years ago

As I said before, please check your database. The error is of a type "conflict" which means such an account is already in the database, hence registration error for the account name which already exist.

Added by Zhenxiang Liang almost 5 years ago


Even after I delete the users from the database, the error still comes. But I think I finally understand what is happening.

Like you said, the error come because the user's already in the database. I guess that's because tsung send the same request to the server after sometime if it does not get the success response from the server. But the user's already in the database, so it return the error.

That's also explain why if we send all the registration request in the short period, we did not receive the error.