• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 333
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 333
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doesn't the activity monitor show you these?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic