wiki:OutOfMemory

java.lang.OutOfMemoryError during synchronisation

By default the server process is limited to 512 Mb or memory, which is sufficient for most environment and has been tested with more then 20.000 contacts. However in certain conditions it might not be enough, in particular when the images associated with contacts are large files. When this happens the server process can run out of memory and crash. To address this problem either :

Use smaller images

The typical image size used by Address Book in about 128x128. Please try to resize your images to a reasonable size before adding them to a contact

Allocate more memory to the process

You can edit the setenv.sh (or setenv.bat) file to allocate additional memory

Change :

JAVA_OPTS="$JAVA_OPTS -Xmx512M -Xms64M -XX:MaxPermSize=384M"

To

JAVA_OPTS="$JAVA_OPTS -Xmx1024M -Xms64M -XX:MaxPermSize=384M"

After changing this file you need to restart your server process : Restarting Address Book Server

When increasing the amount of memory available to the server process please consider the amount physically present on your server. It fairly in-expensive to upgrade most modern macs and about 2GB should be sufficient for most. Bear in mind that the operating system and other applications are also using memory. This is especially important when the server is also used for daily work.