MySQL, jdbc, insert/update executeBatch hangs indefinitely and has not let go?

Hi all.
Have a database on MySQL (5.7.17/19), jdbc 6.0.5 (6.0.6, 8.0.8), java 1.8.144 (Linux/Windows). The base is small. Very active use of the new-fangled type of JSON data. Made triggers that monitor changes and if the user changed the JSON, then save the new data and the old data added to the table logs. So everything works fine.
But there is a sync service user data with 1C. To obtain data from the 1C is not a problem and everything is fine. As soon as I get data I create a preparedStatement and fill it addBatch:
BasicDBList rows = (BasicDBList)com.mongodb.util.JSON.parse( json_data );
 // Update the data cv_users
 StringBuilder sb = new StringBuilder();
 sb.append("UPDATE cv_users SET json_version=?, json_data=cast(? as JSON) WHERE id=?; ");
= ps = conn_mysql.prepareStatement(sb.toString());
 Options.debugMessage("Form CheckPermissionAndUpdateCVUsers executeBatch");
 for(int i=0; i<=rows.size()-1; i++) {
 Rows_i BasicDBObject = (BasicDBObject)rows.get(i);
 String str_id = (String)rows_i.get("id");
 id = Integer.parseInt(str_id);
 Str_json_version String = (String)rows_i.get("<blockquote></blockquote>json_version");
 json_version = Integer.parseInt(str_json_version);
 json_data = ((BasicDBObject) rows_i.get("json_data")).toString();
 ps.setInt(1, json_version);
 ps.setString(2, json_data);
 ps.setInt(3, id);
= ps.addBatch();
}
 Options.debugMessage("Execute executeBatch CheckPermissionAndUpdateCVUsers "+rows.size()+" EA.");
= int[] res_update = ps.executeBatch();

The data is normally filled (cycle fulfills completely), but executeBatch no. That is the problem. Can't get to run.

Already tried:
0. Different versions of the connector, mysql-server (latest too), put the database on Linux/Windows.
1. According to the logs found an entry where all the stops:
my.cnf:

log_output = "FILE"
general_log_file = F:/install/mysql/5.7.19/mysql-5.7.19-winx64/query.log
general_log = 1
log_error = F:/install/mysql/5.7.19/mysql-5.7.19-winx64/error.log
# https://dev.mysql.com/doc/refman/5.7/en/server-sys...
log_error_verbosity = 3

tail:

59d802331c5be304865961.png

With data sure there are no problems. I tried to copy the query directly from the log to the console mysql it normally runs:

59d80a140ab1f196407808.png

2. If I before sending their data a little change (even add a space in the JSON), mysql will accept the data and will stall further on another entry (but not next, maybe in 200-300 or+). And in another entry as there will be no problems and her team from the logs will be executed in the console.
3. Noticed, timeout-s do not work. I.e. if the operation is stuck on
ps.executeBatch();
it's forever until you throw off the update process in the server console or restartin server.
4. In the error logs of mysql, nothing special.
5. Tried to drive through the only update that record (without the other) - again, stop. Scored a pack of locking records - to no avail. Nothing in these records there is no such special.
6. Tried to send not the whole executeBatch, but in parts. For example, 100, and 10 pieces, all the same stopped on this record.
7. Tried to change the query. For example
sb.append("UPDATE cv_users SET json_version=?, json_data=? WHERE id=?; "); // Removed cast
Begins to fall on another record.

Actually the question - what else is there to look or configure?
June 14th 19 at 19:09
0 answer

Find more questions by tags JDBCMySQL