Tag Archives: out of memory error

Dbeaver Java heap space error during SQL Query

How to fix Dbeaver java heap space error while executing SQL Query

While executing the SQL Query in Dbeaver, I am getting java heap space error. It occurred due to large tables not able to fetched in Dbeaver heap space.

java.lang.OutOfMemoryError: Java heap space

Solution:

From open the dbeaver shortcut you can add the following line in dbeaver shortcut key:

-vmargs -Xmx*m    

* -- 2048 or 4096

Example
-vmargs -Xmx4096m   

From windows you can edit the shortcut by click on right click — > go to properties –> Go to Target –> Add this line at last -vmargs -Xmx4096m –> Apply and Ok

Directly open from command prompt with admin option will fixed the error:

dbeaver -vmargs -Xmx4096m

In Linux, you can also use as:

[root@Linux1 Downloads]# dbeaver -vmargs -Xmx4096m

If not have permissions to edit short cut:

if you don’t have permission then copy the target data –> create a new short cut –> paste the copied target data and add this -vmargs -Xms4096m at last –> save the short cut.