[CONJ-367] Large queries give EOFException Created: 2016-10-11 Updated: 2019-09-13 Resolved: 2019-09-13 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.5.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Lars Liljestad | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS Linux release 7.2.1511 (Core) |
||
| Attachments: |
|
| Description |
|
Running four queries in parallel fetching one row from each query at the time the jdbc driver will throw an exception: java.sql.SQLException: java.io.EOFException: unexpected end of stream, read 0 bytes from 6 The code works fine with mysql jdbc mysql-connector-java-5.1.20.jar. How to reproduce: You need a lot of data to reproduce this problem, ~50Gb. 1) Create 2 databases EOF_MYISAM_1 and EOF_MYISAM_2 The exception is thrown with mariadb jdbc, but not if you run same thing with mysql. To use mysql you need to change driver string at the start of the fetch class body. |
| Comments |
| Comment by Vladislav Vaintroub [ 2016-10-11 ] |
|
you are using streaming results, run your queries, don't read the whole data from socket, thus the server stucks writing to socket, and after a while (i.e net_write_tmeout) it would close connection . If I remember correctly, MySQL's driver is doing something with net_write_timeout on its own. If you wish, you can achieve something similar passing the large net_write_tmeout as session variable See (http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_net_write_timeout) |
| Comment by Diego Dupin [ 2016-10-11 ] |
|
Current implementation of fetch is similar to select all results. Difference is that results are read by bulk sith size correspond to fetch size. Temporary solutions :
In next version 1.6.0, for |
| Comment by Lars Liljestad [ 2016-10-12 ] |
|
I can confirm that the workaround, setting net_write_timeout, works! Thanks for the fast reply! |
| Comment by Diego Dupin [ 2016-10-12 ] |
|
Good. |
| Comment by Diego Dupin [ 2019-09-13 ] |
|
Closing, since now documented |