Error in .jcall(conn@jc, "V", "setAutoCommit", ac): java.sql.SQLRecoverableException: [Vertica][VJ
I am trying to insert multiple records (range from 100 to 15000) in Vertica table using dbWriteTable function from my R environment and getting below error message:
Error in .jcall(conn@jc, "V", "setAutoCommit", ac):
java.sql.SQLRecoverableException: [Vertica]VJDBC IOException while communicating with server: java.io.EOFException.
1) This issue is intermittent and not dependent on number of records to be inserted. Usually happening 1 out of 4 times with different Vertica tables.
2) dbWriteTable internally calls dbSendUpdate function, the error message is fetched from there
3) Source code of dbWriteTable - https://github.com/cran/RJDBC/blob/master/R/class.R
4) Source code of dbSendUpdate - https://github.com/cran/RJDBC/blob/master/R/class.R
Additional Information - While executing dbWriteTable, a lock is getting added on the same table on which data is inserted from dataframe. Also, the lock remains there even after the database connection is closed. I have to manually kill the session to remove the lock from the table.
Vertica JDBC driver used - vertica-jdbc-9.3.0-0.jar
Thanks in advance.