Jboss Configuration... Slow Page loads on application - jboss

I am deploying a custom java application to my jboss server... I am getting really really slow page loads (like 15 min) between pages.
Does anyone have any Jboss tips? tools to optimize Jboss? I am using the newest version of Jboss.
Thanks for your thoughts.
Jared

Ok so I finally figured it out... in the Jboss settings file which is ../jboss-5.1.0.GA-src/build/output/jboss-5.1.0.GA/bin/run.conf you have to change the JAVA OPTS;
From:
JAVA_OPTS="-*Xms128m -Xmx512m* -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
To something like this:
JAVA_OPTS="-**Xms1024m -Xmx1024**m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
I hope that helps someone else out there. My pages on my application are loading at 6 sec a pop compared to 10 minutes a page.

You can slim down the JBoss server by removing components you do not need. I beleive that JBoss in action has a section on it.
Note: Examples in the book may not align perfectly with the version you downloaded.

If you're getting 15 minute response times, I don't think that optimizing jboss in general is going to solve your issues. Try something like jboss profiler to see what's causing such slow page loads.

Related

MAMP Pro 6.1 - Apache server not starting

I just update the MAMP to the 6.1 version and now it seems to have a problem with the Apache. The problem is I can not launch the project on the browser ( Open and Open In buttons are disabled).
Any help would be much appreciated.
Thank you
See the picture below
mamp pro v6 interface
i had the same problem, my solution was to choose the new option under "File" > "Reset Apache Modules", after that my Apache was running again ;)
I hope my first stackoverflow answer will help you.
Same problem! just updated to 6.1 and apache not starting. No Logs, just notification from MAMP - "mamp has stopped the apache server".
Opening pages directly not working - ERR_CONNECTION_REFUSED
UPDATE:
i am not sure what exactly happend, but when i went to settings->hosts and clicked some of them for details - "save"button appeared available, so i saved it without any changes (made by me) and now apache server starting and i am able to access webstart page etc.

get started with wildfly confusing

Can anyone suggest a good tutorial how to get started with a JEE application using WildFly server?
I am little confused right now cause at first I decided to start with an official website of the wildfly.
I found some guide links in there and seems like a half of pages are not found or missed.
For example, they have a Getting Started Developing Applications Guide link, when I go there there is another one link which leads to the github page and returns 404 page.
Ok then, i wen to github page with documentation and found following section which describes a list of quickstarts.
So as it says
Quickstarts with tutorials in the Get Started Developing Applications are noted with two asterisks ( ** ) following the quickstart name.
But again if you go to this link it is not found as well and so on.
To be honest I am kind of tired of this confused documentation so I am looking for a best approach how to get my JEE application up and running using WildFly as a server container.
So any suggestions would be really appreciated! Thanks in advance.
If you want to get started with Java EE then have a look at the Java EE 7 tutorial.
If you're looking to just start WildFly so that you can deploy an application you simple download the zip, extract it and use either bin/standalone.sh or bin\standalone.bat to start it. You can get further information about getting started with WildFly here.
The quickstarts are good examples of some simple applications that can be deployed. The README is pretty descriptive on how the quickstarts themselves work, but isn't meant to be a Java EE 7 tutorial.

How to reduce Liferay 6 startup time

Liferay 6.1 takes roughly 60-120 seconds to start on my developer machine. Unfortunately we have to start Liferay very often, so this delay hurts. Actually, most features of Liferay aren't needed by a developer (at least not for us). Is it possible to reduce the amount of time Liferay takes to start? Maybe by removing unused functionality, such as blog, chat and forum?
Please note that I'm not talking about deployment time, which can be reduced a little by following the hints in another StackOverflow thread.
removing unused functionality - that's a good idea, just it will be hard on Liferay 6.1. This is what modularity promises to make possible for Liferay 7, where you should be able to remove the unwanted OSGi bundles. Unfortunately Liferay 7 is not out yet (as of the time of writing this answer beta4 is out) and you're explicitly asking about 6.1.
You could try to deactivate several components - most likely by changing several of the spring configuration files in an ext plugin. However, this has rarely been done, so it might have consequences that nobody has ever seen. Also, it will probably be hard to maintain and upgrade this configuration.
Another way to solve this problem is to ask "Why do you have to restart so often?". In fact, utilizing JRebel for deployments - especially on a developer machine - has shown to be quite effective.
In the answer to Meera Prince's answer you're stating the "generous memory settings" of 1024G - while I agree that this shouldn't limit you in the upstart time, you might want to monitor it, so that you at least don't run into garbage collection during startup time. For a Java application the size of Liferay, 1G memory might be sufficient, but I'd not call it "generous".
Note that 8G RAM on a development machine might be your limitation: As soon as your machine hits virtual memory and starts paging to disk, all bets are off and you'll suffer. And I have no clue what else you're running: Browsers, IDE, Editors, Word Processor, Liferay, random other applications and services. You're hopefully on a 64bit OS.
If you have 8GB of RAM, then put more for Liferay e.g.
CATALINA_OPTS="-Xms4G -Xmx4G -XX:MaxPermSize=512m"
using of CATALINA_OPTS is better then JAVA_OPTS, because JAVA_OPTS will be allocated by shutdown of tomcat too, and CATALINA_OPTS only by startup.
And you can disable not necessary Filters in portal-ext.properties, e.g.
com.liferay.portal.servlet.filters.sso.cas.CASFilter = false
com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter = false
com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter = false
com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter= false
com.liferay.portal.sharepoint.SharepointFilter = false
com.liferay.portal.servlet.filters.gzip.GZipFilter = false
See Liferay: How to configure Liferay Portal
If you are using Tomcat to run Liferay, the following will greatly reduce the time it takes to startup. Modifying your catalina.properties file attributes shown below. The article goes into the details.
org.apache.catalina.startup.ContextConfig.jarsToSkip=*
org.apache.catalina.startup.TldConfig.jarsToSkip=*
tomcat.util.scan.DefaultJarScanner.jarsToSkip=*
http://www.gpickin.com/index.cfm/blog/how-to-get-your-tomcat-to-pounce-on-startup-not-crawl
You may buy an SSD HD
8G RAM must be enough for Liferay 6.1 + Browser + Eclipse, however I have 16G, but I very often have two Liferays running an 20+ open browser windows
A CPU with 4 core can be relevant
Undeploy deployed but not needed portlets
Its depends on resource allocation for liferay JVM means heap and permzen space.
and also depends on your system RAM size
find java script and css related proprieties in liferay portal.proeprties file.
Use Java_OPTS as follows
-Xms1024m -Xmx1024m -XX:MaxPermSize=512m
https://www.liferay.com/community/wiki/-/wiki/Main/Liferay+Developer+Modee
http://www.liferaysavvy.com/2013/12/liferay-environment-challenges-and.html
https://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/lp-6-1-theme-developer-mode
I think, using ramdisk may worth a try.
Windows 7:
http://www.laptopmag.com/articles/faster-than-an-ssd-how-to-turn-extra-memory-into-a-ram-disk
Linux:
http://www.jamescoyle.net/how-to/943-create-a-ram-disk-in-linux
If you have many deployed plugins, it can shorten the startup time.
Without deployed plugins (only with marketplace) I measured the same starttime than with my hdd.

IBM RAD 7.5 ... why does it take WebSphere so long to start / publish / republish / debug?

I'm developing an EAR/WAR application with IBM RAD 7.5 and WebSphere 7.
When I run my app on WebSphere 7 within "eclispe", it take forever for WebSphere to start in "Run" mode (2 or 3 minutes). Much longer to start in "Debug" mode (5 to 10 minutes).
I have 'publish automatically' turned off, so I republish manually, and that too take a long long time.
Am I doing something wrong, or is there anyway to speed thing up?
Thanks,
Rob
Try setting metadata-complete="true" in your web.xml I experienced significant improvements doing this.
I wonder if you're hitting memory limits on your system and perhaps doing a lot of swapping. My WebSphere 6.1 under RAD 8 seems to start in an amount of time consistent with WebSphere by itself.
I would suggest you check the Heap for the test environment.
Personally build automatically and auto-publish should be turned off, You run the publish as and when you need it.
This one is still a good reference
http://www.ibm.com/developerworks/wikis/download/attachments/113606723/radtipsv754.pdf?version=1
Sometimes when it takes 5-10 to publish in debug mode, i either revert to export and install via the admin console or use wsadmin scripts to install the application.
Also turn on the heap config for RAD (one of the preference allows you to show this). You might be able to make some inferences if RAD is hitting into memory issues.
HTH
Manglu

GlassFish 3.1 Netbeanz 7 and REST web services

I tried to run example here http://download.oracle.com/javaee/6/tutorial/doc/gipzz.html and didnt work... There is a bug at netbeans site but i couldnt understand what they are talking about.
It seems that wadl file isnt created....
However a workaround for this was to use the servlet com.sun.jersey.spi.container.servlet.ServletContainer
and seems to work...
Does anyone knows whats wrong ??
The RESTful stuff in NetBeans and Glassfish definitely works, I use it on a daily basis.
Try following this NetBeans tutorial and see if you get anywhere. I've always found the tutorials on the NetBeans site too be very helpful, and easy to follow.
Just to answer..
The problem was that i did the mistake to use the glassfish version that came with Netbeans. This doesnt work . Installing glassfish seperately did work greatly.