TECH NOTE: What to do if Aginity Pro on Windows Crashes upon Opening "Database may be already in Use: Locked by another process"

Background

We have had several tickets opened up since the release of Aginity Pro around the application crashing upon opening with a black screen which may look like this.

Screen_Shot_2019-09-12_at_9.36.33_AM.png

Typically you will get the Aginity Pro Splash screen then this black screen which in most cases says something like:

Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: 
Database may be already in use: "Locked by another process:
C:/Users/<username>/AppData/Local/Aginity/aginity-pro
/aginity_pro.db.lock.db". Possible solutions:
close all other connection(s); use the server mode [90020-199]

Root Cause

The transactional database underneath our application is being held onto by an existing process and causing the Aginity Pro process to not start.  We think it is an Aginity Pro process that did not shut down properly but have been unable to recreate it in our lab, which is why we are asking for some help as well as putting in place safeguards to prevent this in our next release due out 9/16/19, but until then we wanted to ask for some help!

Identification and Work Around

First we are asking our community for some help on identifying the locking application!  You can do this on Windows by doing the following.

Open up the the Resource Monitor (resmon.exe) application that comes with Windows as shown below.

Screen_Shot_2019-09-12_at_10.40.45_AM.png

Click on the CPU tab and then under Associated Handles search for "aginity_pro.db" as shown below

Screen_Shot_2019-09-12_at_10.34.15_AM.png

As you can see in this case an application prl_cc.exe is holding open the aginity_pro.db.lock.db as well as java.exe holding open aginity_pro.db.mv.db.  

If you see this please kill both processes and try to reopen the Aginity Pro application and it should open without issue.  

If you do see this please take a screenshot of the offending processes like the illustration above and send it to support@aginity.com.  It will help us determine what is locking the file us or another application like anti-virus software.

In the example above java.exe is actually the Aginity Pro application which is a Java application and the lock file I opened in a text editor to simulate the locking behavior.

Typically, rebooting your machine should also release any locks.

On a Mac it is similar but done from Terminal.  Open Terminal using Spotlight and typing "terminal" as shown below.

Screen_Shot_2019-09-12_at_10.53.50_AM.png 

Once in a terminal issue the following two commands and take a screenshot or note the offending file locking the database under the COMMAND header in returned results.

1. lsof /Users/<Your Username>/Library/Application\ Support/aginity-pro/aginity_pro.db.mv.db

2. lsof /Users/<Your Username>/Library/Application\ Support/aginity-pro/aginity_pro.db.lock.db

The results of each command will look like this.

Screen_Shot_2019-09-12_at_10.56.12_AM.png

To kill the processes the best thing to do is reboot but if you desire to kill them manually you can issue the kill -9 command as shown below.

Screen_Shot_2019-09-26_at_9.06.20_AM.png

After killing the processes you should be able to restart Aginity Pro.

 

Please drop us a note at support@aginity.com with the details of what you see!

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.