1

We are migrating our java based application from oracle to mariadb. With mariadb 10.5.9, we are using hibernate-5. When our application is running, we are observing in the maxscale query filter, that too many select database queries are getting called. Without maxscale and with the plain mariadb we don't see this issue. We were using mariadb-java-client-2.6.0.jar, but we are seeing issue even with the latest driver (2.7.2).

tcpdump shows prepared statements are not used, statements are getting constructed every time. So I assume with maxscale select database is called while constructing the statement.

So used:

Case 1: db.url=jdbc:mariadb://{host}:{port}/dbname?user=username&password=password?useServerPrepStmts=true

Case 2: db.url=jdbc:mariadb://{host}:{port}/dbname?user=username&password=password?useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=500&prepStmtCacheSqlLimit=1024

Still in both the cases, I see plain statements used and also select database query getting called frequently.

Please share your thoughts.

Anil HB
  • 21
  • 3
  • 1
    Knowing what the MaxScale version is and how it is configured would help, it's hard to say much without knowing what routers are being used. – markusjm Apr 28 '21 at 16:33
  • Maxscale version is 2.3 The configuration is for a single database host. Please let me know what specific configuration is needed. – Anil HB Apr 29 '21 at 14:01
  • This might be something that's easier to track if you open a bug report on the MariaDB Jira under the MaxScale project. You can more easily include files there and communication is simpler using Jira if we don't know exactly why this is happening. – markusjm Apr 30 '21 at 20:24
  • This issue was fixed in MaxScale 2.5.13 version. https://jira.mariadb.org/browse/MXS-3533 is the bug. – Anil HB Jul 30 '21 at 09:11

1 Answers1

0

As was mentioned in the comments, this was a bug caused by MXS-3533. You can fix this problem by upgrading to MaxScale 2.5.13 or newer.

markusjm
  • 2,358
  • 1
  • 11
  • 23