将数据从csv导入postgres时,获取java.lang.OutOfMemoryError:GC开销限制超出

时间:2016-11-02 17:54:09

标签: java postgresql garbage-collection

我正在尝试将数据从CSV文件导入到postgres数据库,但在导入时我遇到错误

ERROR - Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
ERROR -  at java.nio.CharBuffer.wrap(CharBuffer.java:466)
ERROR -  at java.nio.CharBuffer.wrap(CharBuffer.java:487)
ERROR -  at org.postgresql.core.Utils.encodeUTF8(Utils.java:65)
ERROR -  at org.postgresql.core.v3.SimpleParameterList.getV3Length(SimpleParameterList.java:266)
ERROR -  at org.postgresql.core.v3.QueryExecutorImpl.sendBind(QueryExecutorImpl.java:1275)
ERROR -  at org.postgresql.core.v3.QueryExecutorImpl.sendOneQuery(QueryExecutorImpl.java:1547)
ERROR -  at org.postgresql.core.v3.QueryExecutorImpl.sendQuery(QueryExecutorImpl.java:1098)
ERROR -  at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:398)
ERROR -  at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2754)

我从16GB内存和8内核m / c运行它,没有其他进程正在运行,但仍然出现此错误。 这是因为编码。

请帮忙

0 个答案:

没有答案