Heapspace Out of Memory Error

From 360Works Product Documentation Wiki
(Difference between revisions)
Jump to: navigation, search
(Added verification instructions)
(Windows:)
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
By default, 360Works plugins use 96 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.
+
=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.
  
=Pre-built custom memorysize files=
+
==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'')
 
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'')
  
Line 7: Line 8:
 
* [http://sc.360works.com/SuperContainer/RawData/pro/360/wiki/256 256]
 
* [http://sc.360works.com/SuperContainer/RawData/pro/360/wiki/256 256]
 
* [http://sc.360works.com/SuperContainer/RawData/pro/360/wiki/512 512]
 
* [http://sc.360works.com/SuperContainer/RawData/pro/360/wiki/512 512]
* [http://sc.360works.com/SuperContainer/RawData/pro/360/wiki/1024 1024]
+
* [http://sc.360works.com/SuperContainer/RawData/pro/360/1024new 1024]
  
  
Place the memorysize file in one of these locations:
+
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: '/Library/Application Support/360FmKit/'
+
* OS X
* Windows:
+
** 'Macintosh HD/Library/Application Support/360FmKit/'
 +
* Windows
 
** XP:  'C:\Documents and Settings\All Users\Application Data\360Works\'
 
** XP:  'C:\Documents and Settings\All Users\Application Data\360Works\'
** Vista, 7, and 8: 'C:\ProgramData\360Works\' 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]
+
** Vista/7/8/10: 'C:\ProgramData\360Works\' 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]
** Server 2008: 'C:\Users\Admin\360Works\'
+
** Server 2008 (not R2): 'C:\Users\Admin\360Works\'
 +
** Server 2008 <b>R2</b> and versions of Windows Server released after 2008 R2: 'C:\ProgramData\360Works\'
 +
*FMCloud
 +
** /etc/360FmKit/
 +
**<b>NOTE:</b>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 [https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html 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.
  
 +
==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'''
  
=How to create your own memorysize file=
+
===Mac:===
 
+
==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)
 
* 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)
  
Line 32: Line 38:
 
*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
 
*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
  
==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.
  
=Installation verification=
+
==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:
 
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:
 
* http://docs.360works.com/index.php/Plugin_log_files
 
* http://docs.360works.com/index.php/Plugin_log_files
  
If the plugin picked up the memorysize file, there should be a message on/around line 5 stating "Found custom memory file".
+
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
 +
 
 +
=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.
 +
 
 +
===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:
 +
<pre>
 +
Mac: /Library/360Works/Applications/bin/setenv.sh
 +
Windows: C:\Program Files\360Works\Applications\bin\setenv.bat
 +
</pre>
 +
 
 +
Look at the line that begins:
 +
<pre>
 +
CATALINA_OPTS="-Dcom.prosc.tomcat=true -Xmx1024M
 +
</pre>
 +
 
 +
Modify the -Xmx parameter to allocate the desired amount of memory. Below is an allocation of 1 Gigabytes
 +
<pre>
 +
CATALINA_OPTS="-Dcom.prosc.tomcat=true -Xmx1G
 +
</pre>
 +
 
 +
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]]

Revision as of 20:31, 22 July 2022

Contents

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.

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.

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

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)

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

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.

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

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.

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