[Installation, Configuration & DEPLOYMENT] - Memory issues with JBoss 4.2.2.GA
by bngsvcs
I have JBoss 4.2.2.GA installed on Win 2003 Server along with MySQL 5.0 and Apache 2.0. Nearly 2 weeks ago I deployed my Java application and the website went live.
We had over 500,000 hits the first day and have had as many as 750,000 hits in a day since. I have also encountered numerous memory problems. The memory problems have varied from out of heap to GC out of memory.
After a great deal of research I have the JVM parameter in run.conf set to:
JAVA_OPTS="-Xms1024M -Xmx2048M --XX:PermSize=512m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC"
I am still having memory problems.
If I bring up the JBoss web console it tells me I have 123M of free memory. I have monitored the service and it shows a minimum allocation of 64M of memory and never goes above 128M.
I did go back and modify run.bat with the same parameters as above and the results did not change.
I realize I may still need to tune the settings for proper use of the heap but I first need to see that JBoss is receiving a better allocation of space.
My owner is giving me holy he## at the moment. I need to get this monster tuned so that it stops running out of memory but I can't seem to make a difference in how much space it is being allocated.
What am I doing wrong here????
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207752#4207752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207752
17 years, 4 months
[JNDI/Naming/Network] - spi.NotBoundException
by remi-at-work
Hi all,
first - sorry for mu English.
I have following problem. I create the EJB3 bean DbCleanerBean which I want to be executed when JBoss (v5.0) starts. So I create the MBean AutostartService that is looking for the DbCleanerBean in JNDI and executing the method after start.
In 98% it works fine but sometime I got such exception:
ERROR [AbstractKernelController] Error installing to Start: name=jboss:service=AutostartService state=Create mode=Manual requiredState=Installed
org.jboss.ejb3.common.registrar.spi.NotBoundException: Object is bound at key jboss.j2ee:ear=myear.ear,jar=myjar.jar,name=DbCleanerBean,service=EJB3, but is not fully installed, instead of state: ControllerState@180b4f9{Start}
at org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.lookup(Ejb3McRegistrar.java:169)
at org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.lookup(Ejb3McRegistrar.java:133)
at org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.getContainerLocally
XML:
| <mbean code="com.myservice.mbeans.AutostartService"
| name="jboss:service=AutostartService">
| <depends>jboss.j2ee:ear=myear.ear,jar=myjar-ejb.jar,name=DbCleanerBean,service=EJB3</depends>
| </mbean>
|
AutostartService.java
| public class AutostartService implements AutostartServiceMBean {
|
| protected Logger log = Logger.getLogger(getClass());
|
| @Override
| public void start() throws Exception {
| log.info("AutostartService started");
| DbCleanerBusinessLocal bean = (DbCleanerBusinessLocal)new InitialContext().lookup("DbCleanerBean");
| if (bean == null) {
| log.error("Cannot find bean DbCleanerBean in JNDI. Autostartfailed!");
| }
|
| bean.startup();
|
| log.info("AutostartService finished");
| }
| ...
| }
|
As I said - it works in 98% but sometimes I got the NotBoundException.
Why such problem occur? From second hand - how to handle this exception. I try to run this in the loop 3 times (each try after 10 seconds). So the loop execute following code:
| DbCleanerBusinessLocal bean = (DbCleanerBusinessLocal)new InitialContext().lookup("DbCleanerBean");
| if (bean == null) {
| log.error("Cannot find bean DbCleanerBean in JNDI. Autostartfailed!");
| }
|
| bean.startup();
|
|
this doesn't help. How should I handle this exception correctly?
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207743#4207743
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207743
17 years, 4 months