Home > front end >  For SpringMVC sharding - proxy has been READ ONLY the transaction
For SpringMVC sharding - proxy has been READ ONLY the transaction

Time:09-18

Develop a project to use sharding - proxy, using mysql database, but the project after the operation frequently, READ ONLY the transaction errors, if it's not sharding - proxy, directly connect to the database application, will not appear this kind of mistake, don't know where the problem is, here is my sharding - proxy corresponding configuration information:
The config - sharding. Yaml

SchemaName: aaa

DataSources:
Ds_0:
Url: JDBC: mysql://127.0.0.1:33306/aaa? UseLocalSessionState=true& UseUnicode=true& CharacterEncoding=utf-8 & amp; AllowMultiQueries=true& UseSSL=false
Username: root
Password: 111111
ConnectionTimeoutMilliseconds: 30000
IdleTimeoutMilliseconds: 60000
MaxLifetimeMilliseconds: 180000
MaxPoolSize: 50

ShardingRule:
Tables:
Aa_info:
ActualDataNodes: ds_0 aa_info_ ${0.. 19}
TableStrategy:
The inline:
ShardingColumn: id
% 20 algorithmExpression: aa_info_ ${id}
BindingTables:
- aa_info
DefaultDatabaseStrategy:
None:
DefaultTableStrategy:
None:



Server. The yaml file
Authentication:
Users:
Root:
Password: 111111
AuthorizedSchemas: aaa


Props:
Max. Connections. The size, per query: 20
Acceptor. Size: 16 # The default value is The available processors count * 2.
Executor. Size: 16 # Infinite by default.
Proxy. Frontend. Flush. Threshold: 128 # The default value is 128.
# LOCAL: the Proxy will run with a LOCAL transaction.
# XA: Proxy will run with XA transaction.
# BASE: the Proxy will run with B.A.S.E transaction.
Proxy. Transaction. Type: LOCAL
Proxy. Opentracing. Enabled: false
Proxy. Hint. Enabled: false
Query. With. Cipher. The column: false
SQL. Show: false
Allow. Range. Query. With. The inline. Sharding: true


System on a certain probability of the above problems, the feeling is a haven't operation finished, the next action would prompt read-only error, don't know should how to configure to solve this problem, ask the great spirit show
  • Related