File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Memory leaks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Memory leaks" Watch "Memory leaks" New topic

Memory leaks

william gates
Ranch Hand

Joined: Feb 21, 2007
Posts: 112
I have a question regarding memory leaks.

The web app I've been working on uses javabeans, a couple of servlets, jsps, j_security_check authentication, and 2 database connection pools. At this time I've only been using the one connection pool to access the database. The other connection pool isn't accessed yet, but will be in the future. Websphere 6.0 is the application server and it's located on the same box as an http web server.

My web app isn't using the http web server, but there were some issues in regards to certain secured folders that needed to be renamed because the http web server seemed to be using those names as secured.

We don't have access to logs or anything like that on Webspehere 6.0. We can't even see what files are what and where after deployment. We have very little rights on the webspehre 6.0 server. We basically ftp an ear file to the server, run a few jython scripts written by the server admins, and then it either is deployed successfully or not. If there are errors, we have to ask the server admins for more info, which might take an hour, a day or a week.

There are three jython scripts we can execute. Those are update, delete, and install. The problem arises after a week or so of running those updates, deletes, or installs the scripts lock up or time out. And nobody else seems to be able to run those scripts either. The Server admin increased our memory a couple weeks back, but that lasted another week or so more until once again, time outs and lock ups during the deployment process.

My question is would my jsps, db connections, servlets or javabeans cause a memory leak that would stop the server, even after the entire web app has been updated, deleted and reinstalled? Or is it something in the jython scripts or admin side that's causing the memory leak.

Because when the web app is deployed, it hasn't timed out or crashed the server. It seems to work fine. The pages are displayed, the DB data is displayed and manipulated and so on.

It's only after a certain amount of time, a week or two, and running those three scripts(update, delete, or install) where it times out and crashes.

We logon to the unix box, we execute the script, it runs for a short time, and then it just sits there for 10 minutes and finally times out.

Should i look more into my web app for memroy leak causes, it's not an overly complex web app, or should i inform the server admins, who are new to websphere as am I, that it might be something on their side that's causing the memory leak.

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

You've got a tough problem on your hands. It's difficult troubleshooting applications on a production server, or any server where you can't go in and tinker with things yourself.

Do you have Tivoli Performance Viewer, aka Resource Analyser? It comes with WebSphere, and it's a neat tool. You can point it at your web application, and it will show you what objects are getting created, how much memory they are comsing, CPU times and info about WebSphere Connection Pools and Queues and all that stuff.

Sorry I don't have any better answers. Performance problems and application optimization are always difficult and challenging endeavors.

Good luck, and let us know what you find.

-Cameron McKenzie
william gates
Ranch Hand

Joined: Feb 21, 2007
Posts: 112

It's not even the production server. It's the development server but it's being treated with all these security restrictions. Sort of makes sense in one way, but in another it makes testing and developing a nightmare, especially if you just changed one line in a CSS file and have to go through a 30 minute process to deploy it again.

However, I've been told we aren't even allowed to run those kind of scripts on the production server or even have any access to it. I bet that should be fun during deployment.

What makes matters worse is the server admins are learning websphere 6.0 as we speak. On the job training I guess. The two admins have been great, but they, like the servers, are located at a location that is about an hour away from where the developers are located. Not terrible, but not ideal either especially if everybody is basically new to websphere, yet alone websphere 6.0.

So i'm going through the code and files to make sure all the db connections, result sets, prepared statements and so on are indeed closed.

But I'm not sure this would cause the server to crash or time out while deploying. Because as I said, the server doesn't seem to time out while the web applications is running. It only happens when, after a week or so, we try to update, delete or reinstall the application.

I would figure deleting the entire application would close any open connections, if any and so on. But I'm not sure about this.
william gates
Ranch Hand

Joined: Feb 21, 2007
Posts: 112
After the server admin recycled the server, it seems everything is working fine. But that doesn't solve the problem that will be caused again in a week or two.
william gates
Ranch Hand

Joined: Feb 21, 2007
Posts: 112
It seems the recycle didn't work. We haven't figured out the issue but it seems the entire server crashed or is down. Not sure if it was caused by our web application or not, but at this point we are at a stand still.

I thought maybe it was an unclosed database connection. But that theory doesn't fly because a few weeks back we tested or new web app on the server without having any database connections. The web pages and other links seemed to work fine. Then after a week, we no longer could use the jython scripts to update, delete, or install the application. They timed out. The server was recycled and we updated things once again for a week. Then we increased our memory.

I'm not sure what it is at this point, but like I said, we are having an issue when run the jython scripts, which install our web application. We haven't had any problems once the application was actually installed. It's just the installation process where these time outs and errors happen.

Right now it's at a stand still because the server is down and the sever admin isn't being that helpfull.
william gates
Ranch Hand

Joined: Feb 21, 2007
Posts: 112
It seems things are working properly now. Server is back up and working, but still not clear what was causing the memory leak or if there was one.

The server admin said they Enabled Garbage Collection and it seems to have been working ever since.

Is there a reason why they would have Garbage Collection disabled?
I agree. Here's the link:
subject: Memory leaks
It's not a secret anymore!