Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 212
Eclipse IDE Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20368
43
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't the activity monitor show you these?
 
Paul Clapham
Sheriff
Pie
Posts: 20158
23
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic