Heapspace Out of Memory Error

From 360Works Product Documentation Wiki
(Difference between revisions)
Jump to: navigation, search
(Pre-built custom memorysize files)
(Windows:)
 
Line 39: Line 39:
  
 
===Windows:===
 
===Windows:===
* On Windows XP, the memorysize file should be located at 'C:\Documents and Settings\All Users\Application Data\360Works\memorysize'
+
* On Windows, the file should be 'C:\ProgramData\360Works\memorysize'. The ProgramData folder may be hidden. Please see this [http://windows.microsoft.com/en-us/windows/show-hidden-files#show-hidden-files=windows-vista article on how to show hidden files on Windows]
 
+
* On Windows Vista, 7, and 8 the file should be 'C:\ProgramData\360Works\memorysize'. The ProgramData folder may be hidden. Please see this [http://windows.microsoft.com/en-us/windows/show-hidden-files#show-hidden-files=windows-vista article on how to show hidden files on Windows]
+
 
+
* On Windows Server 2008 the file should be 'C:\Users\Admin\360Works\memorysize'
+
  
 
Create a blank text document and rename it to "memorysize". Enter the desired custom memory size in MB. There should only be numbers with no trailing spaces or carriage returns. You must ensure that the file has no extension (.txt, etc.). You can remove extensions by un-checking the "Hide extensions for known file types" box in Windows Explorer folder options. Then rename the file without the extension. You may need to create the "360Works" directory.
 
Create a blank text document and rename it to "memorysize". Enter the desired custom memory size in MB. There should only be numbers with no trailing spaces or carriage returns. You must ensure that the file has no extension (.txt, etc.). You can remove extensions by un-checking the "Hide extensions for known file types" box in Windows Explorer folder options. Then rename the file without the extension. You may need to create the "360Works" directory.

Latest revision as of 20:31, 22 July 2022

Contents

[edit] Plugins

By default, 360Works plugins use 256 MB of heap space for the JVM to run its code. When working with very large files or amounts of data, the plugin may run out memory. You can adjust the amount of memory the plugin has available by creating a custom memorysize file. You must restart FileMaker after installing a custom memorysize to get the plugin to load the new file.

[edit] Pre-built custom memorysize files

These are ready-made custom memorysize files set to various amounts. You can download these and install them to the respective OS directories (sizes are in MB)


Place the memorysize file in one of these locations. If the 360FMKit (Mac) or 360Works folders do not exist at this path, you will need to create it:

  • OS X
    • 'Macintosh HD/Library/Application Support/360FmKit/'
  • Windows
    • XP: 'C:\Documents and Settings\All Users\Application Data\360Works\'
    • Vista/7/8/10: 'C:\ProgramData\360Works\' The ProgramData folder may be hidden. Please see this article on how to show hidden files on Windows
    • Server 2008 (not R2): 'C:\Users\Admin\360Works\'
    • Server 2008 R2 and versions of Windows Server released after 2008 R2: 'C:\ProgramData\360Works\'
  • FMCloud
    • /etc/360FmKit/
    • NOTE:Installation for FMCloud is more complicated as the EC2 instance does not have a user interface and will require that you use some Linux terminal commands. You will need to SSH into the instance using the private key that was used to generate the FMCloud instance. Information on how to SSH into an AWS Linux EC2 instance can be found here. Once you have SSH'd into the instance, you will need to create the "360FmKit" folder inside the /etc folder. Make sure that you name it exactly "360FmKit" as it is case-sensitive. There are different methods to get the memorysize file at /etc/360FmKit. Whatever you choose is up to you. Some methods include: use the touch command to create the file and then use the vi command to edit it with the size that you want (all memorysize files only have one line in them and that is the amount memory in MB you want to allocate to the plugin so a memorysize file for 1024MB would only have 1024 as the contents of the file), use the scp command to transfer the file from your local machine to the remote machine, or use cURL. Once the memorysize file is at that location, restart the instance.

[edit] How to create your own memorysize file

Note: many text editors save "rich" or "formatted" text files with hidden characters in the file that prevent a custom memorysize file from being loaded. If you use one of these editors (MS Word, OpenOffice, etc.), be sure to save a "plain-text" version of the file

[edit] Mac:

  • create a file named memorysize with no extension at '/Library/Application Support/360FmKit/memorysize' which contains the required heap size, in megabytes (i.e. 128)

[edit] Instructions for using Terminal to create custom memorysize file

  • Open Terminal
  • Type "cd /Library/Application\ Support/360FmKit". If this directory doesn't exist yet, you will need to create it using either the "mkdir" command or through Finder
  • Type "sudo vi memorysize". You may be prompted for your password
  • Hit the "a" key to start "append" mode.
  • Enter the desired custom memory size in MB. There should only be the numbers with no trailing spaces or carriage returns.
  • Hit the "esc" key
  • Type ":wq" and hit return. ":" takes you into command mode, "w" is for "write", and "q" is for "quit" so this command will take you out of edit mode, save the file, and go back to the command prompt

[edit] Windows:

Create a blank text document and rename it to "memorysize". Enter the desired custom memory size in MB. There should only be numbers with no trailing spaces or carriage returns. You must ensure that the file has no extension (.txt, etc.). You can remove extensions by un-checking the "Hide extensions for known file types" box in Windows Explorer folder options. Then rename the file without the extension. You may need to create the "360Works" directory.

[edit] Installation verification

It can be difficult to determine if the custom memorysize file has been picked up successfully. You can check the plugin log file for a message on whether the file was loaded. Here is a list of plugin log locations:

To verify that the plugin picked up the new memory allocation search in the logs for "-xmx" The number after it should be the amount of memory allocated by the memorysize file

[edit] Web Applications

360Works web applications have a default memory allocation of 1024 MB. This memory allocation is shared across all 360Works web apps that are installed on the machine. If you are getting out of memory errors, you will need to increase the memory allocation for the web applications. Please follow the instructions below to do so.

[edit] Allocate more memory for web apps

If you need to increase the memory allocation, modify the setenv file in a text editor. The file is located here:

Mac: /Library/360Works/Applications/bin/setenv.sh
Windows: C:\Program Files\360Works\Applications\bin\setenv.bat

Look at the line that begins:

CATALINA_OPTS="-Dcom.prosc.tomcat=true -Xmx1024M

Modify the -Xmx parameter to allocate the desired amount of memory. Below is an allocation of 1 Gigabytes

CATALINA_OPTS="-Dcom.prosc.tomcat=true -Xmx1G

The new memory settings won't take effect until Tomcat is restarted, which can be done using the 360Works Admin utility, which you can restart using the instructions here: Restart_tomcat

Personal tools
Namespaces

Variants
Actions
Plug-in Products
Other Products
Navigation
Toolbox