Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waiting to lock #1612

Closed
zhanglei opened this issue Dec 13, 2018 · 6 comments
Closed

waiting to lock #1612

zhanglei opened this issue Dec 13, 2018 · 6 comments
Assignees

Comments

@zhanglei
Copy link

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details.
If no response more than 7 days and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of Sharding-Sphere did you use?

3.0.0

Which project did you use? Sharding-JDBC or Sharding-Proxy?

Sharding-Proxy

Expected behavior

Actual behavior

Reason analyze (If you can)

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Example codes for reproduce this issue (such as a github link).

"epollEventLoopGroup-4-46" #203 prio=10 os_prio=0 tid=0x00007fbf9c003800 nid=0x21d4 waiting for monitor entry [0x00007fbfc0924000]
java.lang.Thread.State: BLOCKED (on object monitor)
at io.shardingsphere.shardingproxy.backend.jdbc.datasource.JDBCBackendDataSource.getConnections(JDBCBackendDataSource.java:129)
- waiting to lock <0x00000000c02a3060> (a com.zaxxer.hikari.HikariDataSource)
at io.shardingsphere.shardingproxy.backend.jdbc.connection.BackendConnection.getConnections(BackendConnection.java:74)
at io.shardingsphere.shardingproxy.backend.jdbc.execute.JDBCExecuteEngine$ProxyJDBCExecutePrepareCallback.getConnections(JDBCExecuteEngine.java:181)
at io.shardingsphere.core.executor.sql.prepare.SQLExecutePrepareTemplate.getSQLExecuteGroups(SQLExecutePrepareTemplate.java:112)
at io.shardingsphere.core.executor.sql.prepare.SQLExecutePrepareTemplate.access$000(SQLExecutePrepareTemplate.java:49)
at io.shardingsphere.core.executor.sql.prepare.SQLExecutePrepareTemplate$1.execute(SQLExecutePrepareTemplate.java:85)
at io.shardingsphere.core.executor.sql.prepare.SQLExecutePrepareTemplate$1.execute(SQLExecutePrepareTemplate.java:81)
at io.shardingsphere.core.executor.ShardingExecuteEngine.syncExecute(ShardingExecuteEngine.java:109)
at io.shardingsphere.core.executor.ShardingExecuteEngine.execute(ShardingExecuteEngine.java:89)
at io.shardingsphere.core.executor.ShardingExecuteEngine.execute(ShardingExecuteEngine.java:68)
at io.shardingsphere.core.executor.sql.prepare.SQLExecutePrepareTemplate.getAsynchronizedExecuteUnitGroups(SQLExecutePrepareTemplate.java:80)
at io.shardingsphere.core.executor.sql.prepare.SQLExecutePrepareTemplate.getExecuteUnitGroups(SQLExecutePrepareTemplate.java:64)
at io.shardingsphere.shardingproxy.backend.jdbc.execute.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:113)
at io.shardingsphere.shardingproxy.backend.jdbc.JDBCBackendHandler.execute(JDBCBackendHandler.java:96)
at io.shardingsphere.shardingproxy.backend.jdbc.JDBCBackendHandler.execute0(JDBCBackendHandler.java:84)
at io.shardingsphere.shardingproxy.backend.AbstractBackendHandler.execute(AbstractBackendHandler.java:37)
at io.shardingsphere.shardingproxy.transport.mysql.packet.command.query.text.query.ComQueryPacket.execute(ComQueryPacket.java:92)
at io.shardingsphere.shardingproxy.frontend.mysql.MySQLFrontendHandler$CommandExecutor.run(MySQLFrontendHandler.java:125)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:309)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at java.lang.Thread.run(Thread.java:748)

@tuohai666
Copy link
Member

@zhanglei please provide:

  1. configuration
  2. sql
  3. Expected behavior
  4. Actual behavior
  5. Reason analyze (If you can)

@zhanglei
Copy link
Author

1.server.yaml
props:
max.connections.size.per.query: 128
acceptor.size: 64 # The default value is available processors count * 2.
executor.size: 64 # Infinite by default.
proxy.transaction.enabled: false
proxy.opentracing.enabled: false
sql.show: false

  1. dataSources
    autoCommit: true
    connectionTimeout: 30000
    idleTimeout: 60000
    maxLifetime: 1800000
    maximumPoolSize: 50
  2. sql
    image

@tuohai666
Copy link
Member

Expected behavior
Actual behavior

I'd like to ask more simple simply: Is your SQL executed well? If not what did you see from your mysql-client?

@zhanglei
Copy link
Author

myload tool Batch write to sharding-proxy,use insert into ....,process is waiting

@zhanglei
Copy link
Author

sharding-proxy restart can be resolved

@zhanglei
Copy link
Author

Adjust maximumPoolSize and max.connections.size.per.query can be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants