java.lang.OutOfMemoryError: Java heap space in DBeaver

Zeyad Etman picture Zeyad Etman · Sep 20, 2018 · Viewed 11.2k times · Source

I have a .sql file with size 1047399KB,I'm trying to run it on Windows10 with 4.00GB RAM on DBeaver program, i got java.lang.OutOfMemoryError: Java heap space error

I tried many solutions but didn't work with me. file.sql -Xms128m -Xmx512m, file.sql -vmargs -Xmx1024M, file.sql -Xmx800m -Xms500m all didn't work with me.

Answer

vintproykt picture vintproykt · Feb 4, 2019

I encountered same issue: every time you get it, you have to allocate more space and run DBeaver itself first with additional flags -vmargs -Xmx*m. Replace * with 2048 or 4096.

It doesn't look like DBeaver takes garbage out when closing the script, so I had to restart application many times to check right amount of memory needed.

@Timothy Jannace just pointed out that you also can edit dbeaver.ini. Example.