Heapspace Out of Memory Error

From 360Works Product Documentation Wiki
(Difference between revisions)
Jump to: navigation, search
(Windows:: Updated locations for Windows Vista, 7, and 8)
(Pre-built custom memorysize files)
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
When working with very, very large file or amounts of data is is possible that a plugin may run out memory.  To correct this you may need to adjust the memory that the plugin has available.
+
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.
  
===Mac:===
+
=Pre-built custom memorysize files=
* create a file '/Library/Application Support/360FmKit/memorysize' which contains the required heap size, in megabytes (i.e. 128)
+
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'')
  
NOTE: Values higher than 1024 MB can cause FMP/A to crash.
+
* [http://sc.360works.com/SuperContainer/RawData/pro/360/wiki/128 128]
 +
* [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/1024new 1024]
 +
 
 +
 
 +
Place the memorysize file in one of these locations:
 +
* 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 [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 R2 and later: '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'''
 +
 
 +
==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====
 
====Instructions for using Terminal to create custom memorysize file====
Line 11: Line 33:
 
*Type "sudo vi memorysize". You may be prompted for your password
 
*Type "sudo vi memorysize". You may be prompted for your password
 
*Hit the "a" key to start "append" mode.
 
*Hit the "a" key to start "append" mode.
*Enter the custom memory size you want in MB. There should only be the numbers with no trailing spaces or carriage returns.
+
*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
 
*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
 
*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 XP, the memorysize file should be located at 'C:\Documents and Settings\All Users\Application Data\360Works\memorysize'
  
* On Windows Vista, 7, and 8 the file should be 'C:\ProgramData\360Works\memorysize'
+
* 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'
 
* On Windows Server 2008 the file should be 'C:\Users\Admin\360Works\memorysize'
  
NOTE: 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"  
+
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.
option in Windows Explorer folder options.
+
  
You will need to restart FileMaker in order for the changes to take affect.
+
=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:
 +
* http://docs.360works.com/index.php/Plugin_log_files
  
You may need to restart the machine you make this change on after creating the memorysize 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

Revision as of 19:16, 14 August 2018

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.

Contents

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:

  • 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: 'C:\Users\Admin\360Works\'
    • Server 2008 R2 and later: '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:

  • On Windows XP, the memorysize file should be located at 'C:\Documents and Settings\All Users\Application Data\360Works\memorysize'
  • 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.

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

Personal tools
Namespaces

Variants
Actions
Plug-in Products
Other Products
Navigation
Toolbox