Websphere Application Server - What on earth will it take to start any fast?

Jay picture Jay · Jul 24, 2009 · Viewed 25.9k times · Source

I am using Rational Application Developer v7.0 that ships with an integrated test environment. When I get to debugging my webapp, the server startup time in debug mode is close to 5-6 minutes - enough time to take a coffee break!

At times, it so pisses me off that I start cursing IBM for building an operating system instead of an app server! Spawning 20+ processes and useless services with no documented configuration to tuning it, to starting any faster.

I am sure there are many java developers out there who would agree with me on this. I tried to disable the default apps and a set of services via my admin console, however that hasn't helped much.

I have no webservices, no enterprise beans, no queues, just a simple web app which requires a connection pool. Have you done something in the past to make your integrated test environment, start fast in debug mode and there by consume less RAM?

UPDATE: I tried disabling a few services (internationalization, default apps etc...) and now the WebSphere server went from bad to worse. Not only doesn't it take horrifying startup time, it keeps freezing every now and then for up to 2 minutes. :-( Sounds like, optimization is not such a good thing, always!

Answer

Nick Holt picture Nick Holt · Jul 24, 2009

The best way to debug server code is to use remote debugging.

First you need to add the following to the JVM params in the server start script:

-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

This will cause the JVM to listen on the specified port, then from your IDE you can start a remote debug session against that port and debug as if the code was running in the same process.

Working this way prevent you restarting the server so frequently and hence side-steps your problem with Websphere's start-up time.

You can get some odd results if the binaries on the server and the source in the IDE get out of sync but on the whole that's not a problem.