Memory exception when trying to send a repository

Post Reply
pdrybakov
Posts: 1
Joined: 25 Jul 2020, 18:54

Hi all.

I installed Multi User mode on my notebook - 8 core i7, 16 Gb memory.
I didn't install any DB, and I am using Java - jre1.8.0_261.

When I am trying to publish repository, I get next message:
"Rendering repository...
Sending repository snapshot...
Checking for access...
Sending XML snapshot...
Failed to send snapshot to the Report Service :
Essential Viewer ReportService encountered an internal error while receiving your repository snapshot. Contact your system administrator and check Essential Viewer server logs for errors, e.g. memory exceptions."

I can't find cause of the issue, but I can't set Java Max memory pool to 2048 the Tomcat doesn't start with this value.
I can start Tomcat only with such values - Initial memory pool = 512, Max memory pool = 1024.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks for your post.

If you are going to run a multi-user installation, I strongly recommend using a database backend for the Protege repository. It is possible to run it as you have configured it but you will need to make sure that it is configured to perform an automatic save every few minutes to make sure that updates made by the users are saved (see run_protege_server.sh/bat for detail). Note that this will "pause" the operation of the Protege installation whilst the save is taking place. With a database as the persistence layer, every change is saved as it is made and there is no interruption to the service.

The error message you are seeing is being caused by Essential Viewer, which as you've said, is running inside Apache Tomcat. You will need at least 2GB RAM for Essential Viewer to operate successfully, as even the out-of-the-box repositories contain a lot of content before you start your own modelling.

To confirm that it is a memory issue, rather than anything else, check the logs that your Tomcat installation has. Depending on your host platform, these might be in /var/log/tomcat or in <TOMCAT INSTALLATION>/logs. Check both:
  • catalina.out (or catalina.log)
  • essential-viewer.log
If it is a memory, issue, you should see more information in these log files about that.

To resolve, this you can provide Tomcat with more maximum memory. To do this, you need to update your Tomcat start up scripts. These will vary slightly, depending on which operating system your notebook uses. For Mac or Linux, update the startup commands so that the CATALINA_OPTS are set to include the Java Runtime parameters:

Code: Select all

CATALINA_OPTS="-Xms128m -Xmx2048m"
Depending on your Tomcat installation, it may be easier to add this to a 'setenv.sh' file or edit 'catalina.sh'.
This blog post which describes setting the memory parameters via the Tomcat program: 'tomcat8w.exe'

You will need to restart your Tomcat server process for any of the configuration changes to take effect.

Let us know how you get on!

Jonathan
Essential Project Team
Post Reply