This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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.