Increasing Heap size for SQuirreL SQL on Max OS X

18,104

Solution 1

I'm running Linux, so you'll have to adapt this answer somewhat, but it should be applicable.

In the home directory that the installer jar creates, you'll find a file called "squirrel-sql.sh". The last line of this file is the java launch cmd. Not sure about the mac launch configuration, you might need to look for the file in this directory that contains this line. Mine reads

$JAVA -Xmx256m -cp $TMP_CP net.sourceforge.squirrel_sql.client.Main --log-config-file $SQUIRREL_SQL_HOME/log4j.properties --squirrel-home $SQUIRREL_SQL_HOME $1 $2 $3 $4 $5 $6 $7 $8 $9

The -Xmx256m configures the heap - it sets the max heap size to 256m. Just edit the file to read -Xmx512m or whatever. (for a list of the memory flags, type "java -X" at a command prompt).

Solution 2

SQuirreL SQL Client Version 3.7 - Windows

I had the following popup:

Error exceeded memory

The query results have exceeded the maximum amount of memory allocated to this application. All result tabs have been closed to allow you to save your work and restart the application.

and the following message in console (Error tab):

OutOfMemoryError

java.lang.OutOfMemoryError: GC overhead limit exceeded
Position: 0

Solution

  1. Right click on the SQuirreL icon > Properties

    SQuirreL icon

  2. Copy the Target value

    SQuirreL target

  3. Open that .bat file in an editor and replace -Xmx256m with -Xmx1024m:

    start "SQuirreL SQL Client" /B "%LOCAL_JAVA%" -Xmx1024m -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -cp %SQUIRREL_CP% -splash:"%SQUIRREL_SQL_HOME%/icons/splash.jpg" net.sourceforge.squirrel_sql.client.Main %TMP_PARMS%
    
  4. Save and open again SQuirreL SQL.

Share:
18,104
Erik
Author by

Erik

Updated on June 21, 2022

Comments

  • Erik
    Erik almost 2 years

    I'm running SQuirreL SQL (2.6.8) on Max OS X.

    I'm running out of heap space when trying to create a Table script.

    How to configure SQuirreL SQL to start up with a higher JVM heap size?

  • Sathiesh
    Sathiesh about 7 years
    Question was specifically about Mac OS. not about windows
  • ROMANIA_engineer
    ROMANIA_engineer about 7 years
    @Sathiesh I agree, but at least someone found it useful. I also found this question looking for a similar problem on a different operating system and I supposed that others would be in the same situation.
  • leeyuiwah
    leeyuiwah over 6 years
    Thank you for the answer about Windows. It did help me!
  • Satheesh
    Satheesh almost 6 years
    Windows and .sh :/