Knowledgebase
Slow startup and other performance issues due to large database
Posted by John Villanueva on 07 August 2017 08:03 PM

Note: This problem only affects versions 9.3 and higher. 

 

If your JSCAPE MFT Server takes too long to complete its startup process or suffers from performance issues (e.g. high latency, high CPU consumption, high memory consumption, etc), it's probably because the built-in H2 database has grown too large. A database with a few hundreds of MB (e.g. 500MB) in size could already lengthen the startup time. Although the length of time could vary, a 4GB database would typically take between 20-30 minutes to start up. Any size greater than or around 1GB (or even be a bit lower) could cause performance issues. One way to remedy the problem is to compact the database. 

Please follow the steps below to compact the database. Make sure that, in step 4, you don't execute the next command until the previous one has completed execution. If the previous one generates an error, don't proceed to the next. If you're executing the command remotely using SSH, we recommend you use the screen command to avoid getting lost if the remote session disconnects. 

 

Note: If you're using a version > 9.3.20, please use the mft_trunc_db_new.sql instead of mft_trunc_db.sql


1) Stop JSCAPE MFT Server. In your case, you may have to do a "kill -5". Please make sure it is really stopped. Kindly do a "ps -efwww" and confirm there is no java process running JSCAPE MFT Server.

2) Create a backup of your "data" directory

3) Copy the attached mft_trunc_db.sql into <mftserver installdir>

4a) For *nix environments (Linux, Solaris, UNIX, etc)

Note: Please check if you have h2-1.4.191.jar or h2-1.4.196.jar inside <mftserver installdir>/libs directory. Use whichever is present when you execute the commands below. Just replace the h2-1.4.19x.jar

Execute the following commands in sequence while inside <mftserver installdir>.

java -Xmx2048m -cp libs/h2-1.4.19x.jar org.h2.tools.RunScript -url jdbc:h2:./data/server -user server -password server -script mft_trunc_db.sql

java -Xmx2048m -cp libs/h2-1.4.19x.jar org.h2.tools.Script -url jdbc:h2:./data/server -user server -password server -script backup.sql

mv data data1

java -Xmx2048m -cp libs/h2-1.4.19x.jar org.h2.tools.RunScript -url jdbc:h2:./data/server -user server -password server -script backup.sql

4b) For Windows environments

Note: Replace c:\Program Files\Java\jre1.8.0_171\bin\java with the appropriate path in your enviornment. Keep the quotation marks.

Note: Please check if you have h2-1.4.191.jar or h2-1.4.196.jar inside <mftserver installdir>/libs directory. Use whichever is present when you execute the commands below. Just replace the h2-1.4.19x.jar

Execute the following commands in sequence while inside <mftserver installdir>.

"c:\Program Files\Java\jre1.8.0_171\bin\java" -Xmx2048m -cp libs\h2-1.4.19x.jar org.h2.tools.RunScript -url jdbc:h2:./data/server -user server -password server -script mft_trunc_db.sql

"c:\Program Files\Java\jre1.8.0_171\bin\java" -Xmx2048m -cp libs\h2-1.4.19x.jar org.h2.tools.Script -url jdbc:h2:./data/server -user server -password server -script backup.sql

move data data1

"c:\Program Files\Java\jre1.8.0_171\bin\java" -Xmx2048m -cp libs\h2-1.4.19x.jar org.h2.tools.RunScript -url jdbc:h2:./data/server -user server -password server -script backup.sql


5) Start JSCAPE MFT Server service 



Attachments 
 
 mft_trunc_db.sql (0.14 KB)
 mft_trunc_db_new.sql (0.13 KB)
(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako fusion