Showing posts with label Troubleshooting. Show all posts
Showing posts with label Troubleshooting. Show all posts

What do I do when I see java.lang.OutOfMemoryError: PermGen

Troubleshooting JVM Memory Errors

java.lang.OutOfMemoryError: PermGen space

In my endeavors to troubleshoot tomcat memory issues i performed the following in Ubuntu 10.04:
sudo gedit /etc/init.d/tomcat6
Changed (~line 81):
if [ -z "$JAVA_OPTS" ]; then
        JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
fi
To:
if [ -z "$JAVA_OPTS" ]; then
        JAVA_OPTS="-Djava.awt.headless=true -Xmx1024M -Xms1024M -XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewSize=128m"
fi
You can as well explicitly state in catalina.sh file as follows (in bold):
#!/bin/sh
CATALINA_OPTS="-Xms1024m -Xmx1024m"

___________
REF : https://wiki.openmrs.org/display/docs/Troubleshooting+Memory+Errors

Preventing from Mysql holding hand shake problem for OpenMRS WebApp.

Waiting for changelog lock....
Waiting for changelog lock....
Waiting for changelog lock....
Waiting for changelog lock....
ERROR - Listener.contextInitialized(124) |2009-05-26 12:07:49,197| Got exception while starting up: 
javax.servlet.ServletException: java.lang.RuntimeException: error getting unrun updates on the database
 at org.openmrs.web.Listener.setupNeeded(Listener.java:144)

Solution.

You must have attempted an upgrade at some point and it failed in the middle. The liquibase changelog lock is not getting released in these cases. You can manually clear the lock by emptying the liquibasechangeloglock table:

By firing the following command in mysql

delete from liquibasechangeloglock;

(Make sure to not delete the liquibasechangelog table contents, those are important!)


REF : http://openmrs-mailing-list-archives.1560443.n2.nabble.com/Waiting-for-changelog-lock-td5166981.html

http://dev.openmrs.org/ticket/1524

[Solved] Open MRS WebApp build Problem.

Are you Experiencing below kind of a problem when building the OpenMRS System for the First time?

[INFO] Starting jetty 6.1.10 ...
2012-01-19 11:46:28.295::INFO:  jetty-6.1.10
2012-01-19 11:46:29.043::INFO:  No Transaction manager found - if your webapp requires one, please configure one.
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2438) |2012-01-19 11:46:30,460| Unable to find a runtime properties file at /home/harshadura/OpenMRS/Openmrs-trunk/webapp/openmrs-runtime.properties
ERROR - Listener.contextInitialized(154) |2012-01-19 11:46:35,015| Got exception while starting up: 
java.lang.RuntimeException: Error occurred while trying to get the updates needed for the database. Unable to get a connection to the database.  Please check your openmrs runtime properties file and make sure you have the correct connection.username and connection.password set
 at org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:627)
 at org.openmrs.util.DatabaseUpdater.getUnrunDatabaseChanges(DatabaseUpdater.java:586)


Then, Create the "openmrs-runtime.properties" on the place mentioned by the jetty log.

vim /home/harshadura/OpenMRS/Openmrs-trunk/webapp/openmrs-runtime.properties

And then put the below data into it. Note : Create the Database and give the necessary details into it.

connection.username=open
connection.password=open
connection.url=jdbc:mysql://localhost:3306/openmrs?autoReconnect=true

Save and try a Jetty:run again! It should work.