Leximancer 4.5: Adjusting the amount of memory available to Leximancer

If a Leximancer project is taking hours to run, fails to complete a processing stage, or halts with an error message mentioning "out of memory", you may need to increase the memory available to Leximancer.

Leximancer 4.5 is configured to use 1 gigabyte (1GB) of memory by default. This is usually adequate for most analysis purposes. If however you have projects with very large document sets (several hundred megabytes or more) or are using a project configuration that is complex you may need to adjust the amount of memory allocated to Leximancer.

You should not attempt to allocate more than 1/2 of the memory your computer has to Leximancer.

Note: _If you are not comfortable working with your computer's command line, you should have your I.T. department assist in adjusting the memory settings. You may also need administrative rights to alter these settings.

Shutdown Leximancer and follow the procedure for your operating system below, and then restart Leximancer.

Warning: Do not allocate more than 1/2 of your machine's memory.If you have other memory intensive applications running, Leximancer may not be able to allocate the requested amount of memory and will not start.


In the Leximancer installation directory there is a file leximancer.l4j.ini. By default it looks like this:

# Leximancer runtime configuration
# -XmxNUMBERm max memory
# Example -Xmx700m, this gives Leximancer up to 700 megabytes of memory
# Example -Xmx2000m, this gives Leximancer up to 2GB of memory

The line with -Xmx1024m should be replaced with the desired memory value:

  1. -Xmx2g will allocate 2 gigabytes of memory to Leximancer
  2. -Xmx1500M will allocate 1.5 gigabytes (1500 megabytes) to Leximancer

It is suggested you comment out the -Xmx1024m by placing a # at the start of the line so you may easily return to the default value if desired.


From the terminal issue the command (on one line):

defaults write com.leximancer.desktop /com/leximancer/desktop/ -dict-add JVMOptions/ '{"max-memory"="-Xmx4g";}'

You may change the -Xmx4g value to the desired amount of memory:

  1. -Xmx4g allocate 4 gigabytes
  2. -Xmx2g allocate 2 gigabytes
  3. -Xmx750M allocate 750 megabytes

To restore the Leximancer default memory allocation: defaults delete com.leximancer.desktop

Leximancer 4.0: Adjusting the amount of memory available to Leximancer

If you are run a project and are getting error messages mentioning Java Heap or Out of Memory you may need to adjust the amount of memory available to run Lexmancer.

The project memory is adjusted by running the Leximancer configuration application. On Windows, this is available in the Leximancer start menu folder, On OS X, it is in the same Application folder that Leximancer is installed in.

Leximancer Configuration Application

Leximancer Configuration Application

To use:

  1. Shutdown Leximancer
  2. Start the Leximancer configuration Application
  3. Click / Double Click on the Heap Size setting value (750 in this example)
  4. Adjust the memory value in megabytes
    • 750 = 750 Megabytes
    • 1000 = 1 Gigabytes
    • 2000 = 2 Gigabytes
  5. Click the Save button, then Close.
  6. Restart Leximancer

Warning: The amount of memory allocated to Leximancer should normally not be set to more than half of the available memory of your computer. So if your machine has 4GB of ram, do not set the Leximancer memory value above 2000.

Before adjusting the memory for Leximancer, you should review the project settings and size of the source text data to reduce memory requirements. Leximancer allows a great deal of flexibility in project configuration, but this also allows for setting up projects that require a tremendous amount of resource.

Leximancer Pty Ltd, Brisbane, Australia, ACN: 116 218 109