Environment
- Operating system: Windows and Linux
- Third-party technology: Apache Tomcat hosting 360Suite
Symptoms
A 360Suite task fails while it is running.
- The task ends in error and an "Internal Error (Metaspace)" message appears in the task logs.
- The same error is also written to the 360Suite Tomcat logs.
- Example with a Webi Repoint task: the repointing of a data provider fails with the Metaspace error.
Error Message
Message: Internal Error ("Metaspace")
Example (Webi Repoint task): Error repointing DataProvider DP0 : "Internal Error ("Metaspace")"
Steps to Reproduce
- Open 360Suite.
- Run a task that requires a significant amount of memory (for example, a Webi Repoint task on several documents).
- Open the task logs: the task fails with the "Internal Error ("Metaspace")" message. The same error appears in the 360Suite Tomcat logs.
Cause
- Context: The issue occurs when a task requires more memory than what is currently allocated to the 360Suite Tomcat.
- Technical explanation: The Metaspace memory allocated to the 360Suite Tomcat (Java Virtual Machine) is not large enough to run the task, so the JVM stops the processing with a Metaspace error.
Resolution
Option 1 permanently prevents the issue by increasing the memory allocated to the 360Suite Tomcat. Option 2 is a quick action to free up memory if you need to run the task again immediately. Each option is described for Windows and for Linux installations.
Option 1: Permanent Fix (increase the Metaspace memory)
Windows
- Go to your 360Suite installation folder and open the Tomcat Configuration tool as administrator.
- In the General tab, stop Tomcat with the Stop button.
- In the Java tab, either:
- increase the value of Maximum memory pool, or
- increase the value of
-XX:MaxMetaspaceSize=in the Java Options.
- Click Apply, then go back to the General tab and start Tomcat with the Start button.
- Run the task again.
Linux
Prerequisite: Use the root user or a user with full control over the Tomcat installation and its files.
- Stop the Tomcat service hosting 360Suite and wait until it is completely stopped.
- Tomcat managed by systemd:
systemctl stop tomcat(adapt the service name to your installation) - Otherwise:
<TOMCAT>/bin/shutdown.sh
- Tomcat managed by systemd:
- Open the Tomcat Java options file
<TOMCAT>/bin/setenv.shwith a text editor. If the file does not exist, create it. - In the
CATALINA_OPTSvariable, either:- increase the maximum heap size (
-Xmxparameter), or - increase the value of
-XX:MaxMetaspaceSize=
If the parameter already exists, modify its value instead of adding it a second time. Example:
export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxMetaspaceSize=1024m" - increase the maximum heap size (
- Save the file and start the Tomcat service.
- Tomcat managed by systemd:
systemctl start tomcat - Otherwise:
<TOMCAT>/bin/startup.sh
- Tomcat managed by systemd:
- Check that the new value is applied by looking at the running Java process:
ps -ef | grep MaxMetaspaceSize - Run the task again.
Option 2: Workaround (clean the Tomcat cache)
Windows
- Stop the 360Suite Tomcat service.
- Go to the following folder:
<360 Tomcat>\conf\Catalina\localhost - Delete the content of the
localhostfolder, without deleting thelocalhostfolder itself. - Start the 360Suite Tomcat service.
- Run the task again.
Linux
- Stop the Tomcat service hosting 360Suite (see Option 1, Linux, step 1).
- Go to the following folder:
<TOMCAT>/conf/Catalina/localhost - Delete the content of the
localhostfolder, without deleting thelocalhostfolder itself. Example:rm -rf <TOMCAT>/conf/Catalina/localhost/* - Start the Tomcat service (see Option 1, Linux, step 4).
- Run the task again.
This workaround only frees up memory temporarily. Apply Option 1 to prevent the issue from happening again.
Additional Information
- On Linux, if Tomcat does not start after the change, review the Tomcat logs (
logs/catalina.out,logs/catalina.<date>.log,logs/localhost.<date>.log). For Tomcat managed by systemd, you can also runsystemctl status tomcatandjournalctl -u tomcat -n 100. - If the issue persists after increasing the memory, please contact the support with:
- the task logs and the 360Suite Tomcat logs,
- on Windows, a screenshot of the Java tab of the Tomcat Configuration tool,
- on Linux, the content of
<TOMCAT>/bin/setenv.sh, your Linux distribution and your Tomcat version, - your 360Suite version and the steps you followed in this article.