I'm using the Microsoft's Jview, any Idea how to set it's maximum amount of
virtual memory?
-----Original Message-----
From: Craig R. McClanahan
Sent: Wednesday, June 02, 1999 5:24 PM
To: Java Apache Users
Subject: Re: COM & JServ reloading
Peter Dunn wrote:
> Some more info:
> class MyServlet{
> static create new COM server object
>
> init(ServletConfig config)throws ServletException{
> super.init(config);
> ...
> connect COM server
> }
> doGet{
> ...
> data = COM server read
> ...
> }
>
> Works once but on when the second request is made I get a
> java.lang.OutOfMemoryError?
> Any ideas on cause?
> Jserv.log
> [02/06/1999 17:17:58:888 PDT] Initializing servlet request
> [02/06/1999 17:17:58:888 PDT] Reading request data
> [02/06/1999 17:17:58:918 PDT] Parsing cookies
> [02/06/1999 17:17:58:938 PDT] ThreadedOpcServlet: init
> [02/06/1999 17:17:59:009 PDT] Calling service()
> [02/06/1999 17:17:59:099 PDT] Sending response headers.
> [02/06/1999 17:18:01:322 PDT] Connection from localhost/127.0.0.1
> [02/06/1999 17:18:01:322 PDT] Initializing servlet request
> [02/06/1999 17:18:01:322 PDT] Reading request data
> [02/06/1999 17:18:01:442 PDT] Parsing cookies
> [02/06/1999 17:18:01:442 PDT] Calling service()
> [02/06/1999 17:18:01:442 PDT] Sending response headers.
> [02/06/1999 17:18:01:442 PDT] java.lang.OutOfMemoryError
> at org/apache/jserv/JServConnection.run (JServConnection.java:365)
> at java/lang/Thread.run (Thread.java:475)
>
The exception is pretty good evidence that the JVM ran out of memory :-)
The fact that it happened inside a JServ object is pretty arbitrary -- it
could just as easily happen inside user code that tries to create a new
object when there is no more room.
The solution is to increase the maximum amount of virtual memory that your
JVM is allowed to use. If you're starting JServ manually, you do this with
something like -mx64m on the command line, to allocate up to 64 megabytes.
If you are starting it automatically, this is done in the jserv.properties
file, with a line like:
wrapper.bin.parameters=-mx64m
Craig McClanahan
-- --------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]
-- --------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]