Project

General

Profile

muc rooms. tigase.db.TigaseDBException: Error getting subnodes list

Serhii Administrator
Added over 3 years ago

Hi,

I have a problem with the loading muc-rooms.

        at tigase.db.jdbc.JDBCRepository.getSubnodes(JDBCRepository.java:420)
        at tigase.db.UserRepositoryMDImpl.getSubnodes(UserRepositoryMDImpl.java:221)
        at tigase.muc.repository.MucDAO.getRoomsJIDList(MucDAO.java:186)
        at tigase.muc.repository.inmemory.InMemoryMucRepository.<init>(InMemoryMucRepository.java:87)
        at tigase.muc.MUCComponent.createMucRepository(MUCComponent.java:265)
        at tigase.muc.MUCComponent.setProperties(MUCComponent.java:556)
        at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
        at tigase.conf.Configurator.componentAdded(Configurator.java:50)
        at tigase.conf.Configurator.componentAdded(Configurator.java:33)
        at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
        at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
        at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
        at tigase.server.MessageRouter.setProperties(MessageRouter.java:705)
        at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
        at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
        at tigase.conf.Configurator.componentAdded(Configurator.java:50)
        at tigase.conf.Configurator.componentAdded(Configurator.java:33)
        at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
        at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
        at tigase.server.MessageRouter.setConfig(MessageRouter.java:604)
        at tigase.server.XMPPServer.start(XMPPServer.java:141)
        at tigase.server.XMPPServer.main(XMPPServer.java:111)
Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2765)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2550)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
        at tigase.db.jdbc.JDBCRepository.getSubnodes(JDBCRepository.java:407)
        ... 22 more
2015-11-06 10:00:30.314 [main]             MUCComponent.setProperties()       WARNING:  Cannot initialize MUC Repository
    but after a few reboots of the tigase server, the problem goes away. You can explain why?

Replies (10)

(1)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

It looks like a problem with connectivity to your database:

Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
(1)

Added by Serhii Administrator over 3 years ago

Problems with access to the database does not exist. I have a lot of rooms more than 100 000. The problem goes away after a certain number of restarts the server. Can you explain why? If the restriction in the code?

(1)

Added by Daniel Wisnewski IoT 1 Cloud over 3 years ago

Nothing should change with Tigase in terms of connection to the database, are you sure MySQL is started when you begin running Tigase? Do you have similar errors for other databases (user, auth, etc..)? or is this strictly the MUC database that gives you the MySQLTimeout?

(1)

Added by Serhii Administrator over 3 years ago

Nothing should change with Tigase in terms of connection to the database, are you sure MySQL is started when you begin running Tigase?

  • yes I am absolutely sure that the database is running.

Do you have similar errors for other databases (user, auth, etc..)? or is this strictly the MUC database that gives you the MySQLTimeout?

  • Only problem with muc.

P.S. The rest of the functionality of the server works well.

(1)

Added by Serhii Administrator over 3 years ago

Hi guys

Any ideas?

(1)

Added by Eric Dziewa over 3 years ago

There is a problem with connectivity to your DB. Could be caused by having 100,000 MUC's and not enough CPU horsepower. What do your DB logs say?

Added by Serhii Administrator over 3 years ago

What do your DB logs say?

there are no erros in mysql logs.

Can you provide me sql request, that done this action? -> tigase.db.TigaseDBException: Error getting subnodes list.

(1)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

You can append &profileSQL=true to your jdbc URI which will enable MySQL debugging providing detailed information.

(1)

Added by Serhii Administrator over 3 years ago

Hi, thank you, for debugging key.

But unfortunately I don't find SQL request that created me problems. Before errors I have such sql requests:

1) > duration: 2 ms, connection-id: 4, statement-id: 10605, resultset-id: 6221, message: select nid as nid2, node as node2 from tig_nodes, (select nid as nid1 from tig_nodes where (uid = 39) AND (parent_nid is null) AND (node = 'root')) nodes1 where (parent_nid = nid1) AND (node = 'rooms')

that request give me such output

+------+-------+

| nid2 | node2 |
+------+-------+

| 70 | rooms |
+------+-------+

1 row in set (0.01 sec)

2) > select @@session.tx_read_only;

that request give me such output

+------------------------+

| @@session.tx_read_only |
+------------------------+

| 0 |
+------------------------+

1 row in set (0.00 sec)

They did not give me useful information.

Have you any other suggestions?

(1)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Serhii Administrator wrote:

Have you any other suggestions?

the exception is:

Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request

so it looks like the query took to long to execute. Please check MySQL logs for more information.

    (1-10/10)