java.lang.OutOfMemoryError: Java heap space in DBeaver

20,853

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.

Share:
20,853
Zeyad Etman
Author by

Zeyad Etman

INTJ - Software Engineer

Updated on July 22, 2022

Comments

  • Zeyad Etman
    Zeyad Etman almost 2 years

    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.

  • Nicholas Humphrey
    Nicholas Humphrey about 5 years
    Thanks this solved my problem! It's a bit worrying that a test of SELECT * FROM LEFT JOIN for a small database actually takes around 2GB ram.
  • vintprox
    vintprox about 5 years
    @NicholasHumphrey Well, I noticed phpMyAdmin comes in handy for import task, for example, better than DBeaver and HeidiSQL. I was assuming that native software must provide more seamless experience and overtake memory limits of web application, but it's not the case with specific, database software, I guess.
  • GIRI KUMAR PANEM
    GIRI KUMAR PANEM about 4 years
    I tried 1Crore data to important one DB to another DB but the tool is not responding. Then I have increased memory parameters in ".ini" file after that it's successfully imported. Hope it's helpful for someone.
  • cryanbhu
    cryanbhu almost 4 years
    can someone explain how to run DBeaver from command line? I am using Mac OS version. It seems it is an .app file
  • Timothy Jannace
    Timothy Jannace over 3 years
    Try editing the values in the ini file instead. You should be able to find the file in the program directory of dbeaver. It should be called dbeaver.ini
  • vintprox
    vintprox over 3 years
    @cryanbhu edit dbeaver.ini file as shown here. Path should be something like /Applications/DBeaverEE.app/Contents/Eclipse/dbeaver.ini.
  • Joao Vitor Deon
    Joao Vitor Deon about 2 years
    I changed two parameters on my dbeaver.ini file: -Xms500m -Xmx4096m worked for me