# “java.lang.OutOfMemoryError” when using JDBC driver on a tool

**URL:** <https://community.cdata.com/t/java-lang-outofmemoryerror-when-using-jdbc-driver-on-a-tool/431>\
**Category:** Editions\
**Tags:** article, jdbc, dbeaver, dbvisualizer\
**Created:** [October 3, 2023, 7:32pm UTC](https://community.cdata.com/t/java-lang-outofmemoryerror-when-using-jdbc-driver-on-a-tool/431 "2023-10-03T19:32:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dardi\_R](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@Dardi\_R](https://community.cdata.com/u/Dardi_R)\
**Post date:** [October 3, 2023, 7:32pm UTC](https://community.cdata.com/t/java-lang-outofmemoryerror-when-using-jdbc-driver-on-a-tool/431/1 "2023-10-03T19:32:38Z")

</div>

When performing memory-intensive queries like joining two tables that contain a large number of rows, it sometimes exceeds the heap memory allocated by the tool configuration settings, resulting in an **Out of Memory** error.

To resolve such issue, you can perform the following configuration steps on each tool respectively:

In DBeaver, to increase the allocated heap memory by 2GB, proceed into adding the following setting in dbeaver.ini file (typically stored on a similar path: C:\Users\User\AppData\Local\DBeaver).

![06553cfd-1bdd-49e3-843f-64f334b97378.png](https://us1.discourse-cdn.com/cdata/optimized/2X/b/bd5055f6b81dac2c4ba92c7daf1a7f2f57793e46_2_690x62.png)

In DBVisualizer you can update such settings via the Tools Properties window. In the below example we are setting the maximum allocated heap memory to 4GB.

 ![33cab174-70f5-4b8a-b214-a3ca3383600f.png](https://us1.discourse-cdn.com/cdata/original/1X/576659b7b535ba58fd8e0fb008adab27442e2f4c.png)

After performing the above configuration, you should be able to execute the query successfully.

Please reach out to [support@cdata.com](mailto:support@cdata.com) if the above instructions are not helpful.
