aspose file tools*
The moose likes Java in General and the fly likes Is this a Java Memory problem or a Windows / SQL Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Is this a Java Memory problem or a Windows / SQL Issue" Watch "Is this a Java Memory problem or a Windows / SQL Issue" New topic
Author

Is this a Java Memory problem or a Windows / SQL Issue

David Garratt
Ranch Hand

Joined: Aug 08, 2003
Posts: 198

I have a server running a java application as a windows service using the open source wrapper.exe

I connected to the server today and tried to run the desktop "swing" element of my application (on the server console) and encountered a error message which said something along the lines of "insufficient memory to execute query"

The server has 4GB of RAM running Windows 2003 Server and MS SQL 2005.

Task Manager implies that SQL Server was using almost 2GB of RAM and my java service (java.exe process) was using about 50mb of RAM. At startup is uses about 38mb of RAM and fluctuates up and down.

The server appeared to have approx 30-40% RAM available.

The service had been running for about a month.

My line of thought is that the swing desktop application was running as a separate JVM and was probably not being effected by the java service JVM. If so we are looking at Windows available RAM.

The error message I got could have been from java, but I'm also leaning towards SQL server generating the error and returning it back to my SWING java desktop application. The application did load ok, but parts of the menu which are stored in the database did not initialize properly.

Before I start looking for a memory leak in my java service do you think it could be a SQL Server problem ? It does seem to grab lots of memory unless you put a cap on it.

The desktop app worked as soon as I freed up some more memory by stopping some services.

Thanks

Dave
David Garratt
Ranch Hand

Joined: Aug 08, 2003
Posts: 198

Reading up on this more I think its likely to be one of 2 scenarios. Either I need to set the min/max memory that SQL can use on the server. Or I am somehow opening cursors and not closing them again on my java service.

I would like to prove that latter one way or another, but I've not found any way for me to display open cursors with ms sql.

Does anyone know if this is possible ?

Thanks

Dave
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19719
    
  20

Doesn't the activity monitor show you these?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18654
    
    8

David Garratt wrote:The error message I got could have been from java, but I'm also leaning towards SQL server generating the error and returning it back to my SWING java desktop application.


I wouldn't expect the two error messages to be identical. I would expect that looking carefully at the error message would enable one to tell where it came from.

However you haven't posted the error message. Please read TellTheDetails.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is this a Java Memory problem or a Windows / SQL Issue