Saving project in multi-user and logging out

Post Reply
VincentBernard
Posts: 10
Joined: 05 Mar 2015, 14:56

Hi !

We are currently planning to put into production the enterprise architecture repository. Some problems, however, must be resolved before moving into production environments.

First, for each massive information import, the server saturates and must be restarted. Each batch in import Import Utility saturates a part of the RAM memory that stays busy indefinitely. After 10 batch, the server becomes unusable.

Once the server is restarted, the Encyclopedia returns to a previous state. How to save the state of the encyclopedia before restarting? Is it in the database or in the .pprj file? Or Both? The installation is based on a Windows server (Protégé server and webapps are on the same machine. In the production environment, they will be different).

Second, the user sessions do not seem to disconnect. When a user connects, his name appears several times in the list of online users. They don't seems to log-out when they close the software.

Thank you for helping us finalizing our project ! 8-)
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi,

Let me start by asking you some questions to clarify your deployment.

1. Are you using the Essential Import Utility to perform these mass imports?

2. Have you configured your repository to be persisted in a relational database, e.g. MySQL / MS SQL Server?

We recommend using what Protege call a ‘database backend’ on your Protege server as this persists each update as it happens and there is no need to “save”.

You can run the server using the file-based repository of the 3 Protege files but then the server must be configured (in run_protege_server.bat) to perform an automatic save on a time basis (e.g. every 10 minutes). Note that this save has a noticeable affect on client-server performance. Hence, we recommend the ‘database backend’.

We also recommend using the supplied shutdown_protege_server.bat script to terminate the Protege server gracefully. This disconnects all client sessions before shutting down the server process. Alternatively, you can connect to the Administration client from Protege client and command the server to shutdown from there.

I suspect that if your server has locked itself, e.g. as a result of running out of memory, it is not terminating correctly and the client sessions are not being notified of the server shutdown.

The last thing to think about on the Protege server is the maximum memory configuration. We strongly recommend that at least 2GB RAM is available to the Java environment in which Protege server is running. If possible (e.g. on 64-bit platforms) even more is useful!

Jonathan
Essential Project Team
VincentBernard
Posts: 10
Joined: 05 Mar 2015, 14:56

Thank you to respond as quickly!

1: Yes, we use Essential Import Utility for imports.
2: We are on a MS SQL Server database, users actually do not have a Save button, the changes are applied and visible in real time.

I also use the script to close shutdown_protege_server.bat Protected Server and run_protege_server.bat to start it.

The server is a VM and has 8GB RAM and 2 Xeon CPU @ 2.27GHz.

The data, however, are destroyed and must be re-imported following a restart. The modifications to the metamodel(new slots, new relationships) are also destroyed. We need to re-edit the metamodel and every little forgetfulness harmed the import, which must be done several times before everything is perfect.

Enterprise architecture is currently saved as a whole on an excel file, as long as this problem persists it is impossible to use Protégé reliably.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks for the update.

More questions from me, sorry!

If you update the repository directly in the Protege client (connecting to the server-based repository) are those updates persisted?

I wonder if the problem is with the Import Utility or with the Protege server itself. Protege server should, once you've opened the repository, save every new instance, every slot value change as you make them. That is why the Protege client, when connecting to a project running on the server does not have the save button active. The server takes care of that for you.

What we need to establish is whether there is an issue with the Protege server configuration or with the Import Utility when it is importing your spreadsheet.

If no changes are being committed when you are working directly in Protege, then we can look into configuration issues with the Protege server and your repository.

However, if Protege is operating correctly when working manually, then I suspect that the problem lies with the Import Utility. As with the Protege server, we need to make sure that it has plenty of memory available (>2GB if on a 64-bit platform) and we normally run it in a separate Java Virtual Machine to ensure that it does not interfere with Essential Viewer.

Let me know about the "manual" Protege server behaviour and we can continue troubleshooting.

Jonathan
Essential Project Team
VincentBernard
Posts: 10
Joined: 05 Mar 2015, 14:56

Updating instances, whether performed by the Import Utility or a Protégé client, works. In fact, everything works fine until restart.

We are a few users at the same time to modify instances, and everything works for several days.

But when the VM restarts, the encyclopedia goes back to a previous state (which is not the original of Essential Project).
User avatar
neil.walsh
Posts: 444
Joined: 16 Feb 2009, 13:45
Contact:

Hi,

Just a thought... is the virtual machine restoring to some kind of snapshot on restart perhaps?

To test this, you could try creating a file somewhere, restart the VM and see if the file is still there.

This sounds more like a VM issue than an Essential issue from what you've described. It's certainly very unusual.

Thanks

Neil
VincentBernard
Posts: 10
Joined: 05 Mar 2015, 14:56

Hi !

All the views that we have developed in the / essential_viewer / user / remain there even if the server restarts. I joined you a screenshot of Protégé Server startup log.

I also believe that the problem lies in the installation or configuration of the server. But I do not have administrator rights on the server, and the installation was made by another team.

In the Windows Services, Essential Server AM is dependant to Apache Tomcat and SQL Server. If I do not restart the server, the run and shutdown script works fine.
You do not have the required permissions to view the files attached to this post.
VincentBernard
Posts: 10
Joined: 05 Mar 2015, 14:56

Hi,

I got a little deeper in the problem.

In the article "Enabling collaboration," the second step indicates: "When Prompted to open a project, open your Essential Architecture Manager repository project file in stand-alone mode".

I didn't know that the multi-user encyclopedia was available in stand-alone mode. In fact, I didn't know that the Protégé server keeps the encyclopedia in the database and in a file.

So I pushed my investigation a little further to understand the problems of the server.

Two essential_baseline_V4.3.1.pprj files are present on the server:

- one in C:\Program Files\Essential Architecture Manager\essential_metamodel\essential_baseline_V4.3.1.pprj (let's call it # 1)

- and the other in C:\Program Files\Protege_3.5\essential_baseline_V4.3.1.pprj (# 2).

I opened both in Protégé, on the server, in stand-alone mode.

For # 1, I have a copy of the encyclopedia available to clients connecting to the server. Instances are almost up to date (the changes by Protégé client today are not there).

For # 2, I have the famous copy that is the basis upon restarting the server. This is the exact state where the encyclopaedia comes back after a reboot.

I then opened the metaproject located in C:\Program Files\Protege_3.5\examples\server\metaproject.pprj. In the instance Essential AM Repository (PolicyControlledObject::Project), the registered location is written as : "C:\Program Files\Essential Architecture Manager\essential_metamodel\essential_baseline_v4.3.1.pprj" (this is a cut and paste of the address in Protégé).

Are you able to identify abnormalities in my installation? I wish I could give clear instructions to the installation team. Thank you !
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi,

Thanks for all the trace and follow up that you’ve sent through.

One thing I noticed on the trace, was that a user “Guillaume” was not able to log in on the first attempt but did on the second. Also, user “Vincent” was able to log in.

In the trace, the first important message to look for is:
Protege server ready to accept connections…
You can ignore the warnings that are reported.

From the trace, it seems that the server has started and that Guillaume and Vincent can log in to the Protege server.

About your two versions of the repository:
From what you’ve described, it seems that #1 is the project that is being served by the server - if that’s the one that you see when you connect. #2 seems to be a ‘baseline’ that is not being updated.

In that metaproject.pprj, you define which project is being used by the server. I would recommend storing the project file OUTSIDE of the Protege run time as this is data and you don’t want it to be affected by any upgrade to Protege etc. You can locate this file anywhere that the server can access and then update the location in the metaproject.

Go into the “Policy Controlled Objects” and then “Project” instances to find and select your project and then update the location slot. Once updated, save the metaproject (which you can open in Protege) and restart the Protege server.

Also in the metaproject is the catalogue of users that can access the server.

Moving the repository out of the “Programs” area may also help with the Neil’s good point about the potential for a VM refresh / reset. Once the Protege project has been connected to the database, this shouldn’t be an issue.

I hope this helps.

We’ve tried to provide very clear, step-by-step instructions for the installation and configuration of the environment. Protege is a little tricky! I think it would help us to help you if you could go through those and highlight to me which of the steps are not clear and we can take it from there.

Jonathan
Essential Project Team
Post Reply