RE: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread Caldarale, Charles R
> From: Eric Laflamme [mailto:elafla...@iweb.com]
> Subject: Re: Virtualization (Xen, vmware) + Tomcat
> 
> Here is the information about the server:

Except the critical bit, which is how much virtualized memory have you 
provisioned the virtual server with?  The evidence points to that being 
insufficient.

>   We install a cPanel 11.25

We still have no idea what cPanel is.

> I don't know if the problem is Tomcat itself or Tomcat
> only have a symptom of another problem.

If the JVM initialization message your posted previously is in fact the only 
symptom you're seeing, then it has nothing to do with Tomcat - Tomcat isn't 
even started at that point.  If you're running out of virtualized memory for 
your virtualized server to the point that another process (the JVM) cannot even 
start, you need to find out what's consuming the virtualized memory.  Tools 
like ps might help.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread Eric Laflamme
Hi Peter,

Here is the information about the server:

We have a Xen Host with CentOS release 5.4 (Final)
In that host, we have a vm with CentOS release 5.4 (Final)
We install a cPanel 11.25
The version of tomcat is 5.5.28

The tomcat we use is the one package with cPanel. We already communicate with 
their support. A lot of time.. But they are, like us, clueless on how to solve 
this problem. So I came here as another step to try to resolve this issue.

I don't know if the problem is Tomcat itself or Tomcat only have a symptom of 
another problem. But as we only have this problem and log of the problem by 
now, we start with tomcat to maybe found what is the real problem.

-- 
Eric Laflamme [iWeb]
IT Architecture Specialist
Spécialiste de l'Architecture TI
http://www.iWeb.com/




Le 2010-03-30 à 12:01, Peter Crowther a écrit :

> On 30 March 2010 16:45, Caldarale, Charles R 
> wrote:
> 
>>> From: peter.crowth...@googlemail.com
>>> [mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther
>>> Subject: Re: Virtualization (Xen, vmware) + Tomcat
>>> 
>>>> Error occurred during initialization of VM
>>>> Could not reserve enough space for object heap
>>> 
>>> OK, so that's the Java virtual machine running Tomcat not
>>> being able to extend its heap.
>> 
>> Actually, that's the JVM trying to allocate the *initial* space for the
>> heap, not extend it.  There hasn't been any attempt to load and run Tomcat
>> yet.
>> 
>> 
>> My mistake.  In that case, if Eric's seeing lots of those in the log files,
> it implies that the JVM intended to host Tomcat is repeatedly failing to
> start and some other process is repeatedly trying to start Tomcat.
> 
> Eric, could you tell us more about your statement that "Tomcat is running
> inside the VM and is, by the way, a cPanel"?
> - What operating system?
> - What version of Tomcat?
> - Did you download the Tomcat directly from http://tomcat.apache.org, or was
> it packaged with some third-party software?
> 
> In particular, if it's a version of Tomcat that was packaged with cPanel,
> you may well be better asking them about the issue.
> 
> - Peter


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread Eric Laflamme
Hi,

Let me first apologize for that, I'm pretty new with mailing list.. It won't 
happen again.

-- 
Eric Laflamme [iWeb]
IT Architecture Specialist
Spécialiste de l'Architecture TI
http://www.iWeb.com/




Le 2010-03-30 à 12:11, Pid a écrit :

> On 30/03/2010 16:29, Eric Laflamme wrote:
>> Hi,
>> 
>> We have a lot of server using virtualization (xen source) and we have a lot 
>> of problem with tomcat. Tomcat process seems to stop responding after 
>> undetermined time and write in loop this in the catalina.out:
>> 
>> Error occurred during initialization of VM
>> Could not reserve enough space for object heap
>> 
>> The servers has 32 gig of ram so it's not the ram that is in need. We tried 
>> to specifiy the memory for tomcat like:
>> 
>> -Xmx1024M
>> -Xms512M
>> 
>> But nothing seems to help. Does anybody have any ideas for this behaviour?
>> 
>> Thank you.
>> 
> 
> As an aside, it's consider bad form (thread hijacking) to reply to someone 
> elses email & then change the subject and body to your own message.
> 
> 
> p
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread Pid

On 30/03/2010 16:29, Eric Laflamme wrote:

Hi,

We have a lot of server using virtualization (xen source) and we have a lot of 
problem with tomcat. Tomcat process seems to stop responding after undetermined 
time and write in loop this in the catalina.out:

Error occurred during initialization of VM
Could not reserve enough space for object heap

The servers has 32 gig of ram so it's not the ram that is in need. We tried to 
specifiy the memory for tomcat like:

-Xmx1024M
-Xms512M

But nothing seems to help. Does anybody have any ideas for this behaviour?

Thank you.



As an aside, it's consider bad form (thread hijacking) to reply to 
someone elses email & then change the subject and body to your own message.



p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread André Warnier

Eric Laflamme wrote:
...



We tried to specifiy the memory for tomcat like:

-Xmx1024M
-Xms512M

But nothing seems to help. Does anybody have any ideas for this behaviour?

Keep -Xms and -Xmx the same.  If you do that, Java will allocate all the

heap as it starts.  You will either get a failure at startup (which is
easier to deal with) or the heap memory will be allocated.


We try all kind of allocation and the problem isn't showing at startup.. It 
happen only after few hours. If this can help, it can happen on a server that 
doesn't contain any data.. A fresh install of Cpanel and after few hours, it 
can happen..


As you have found, allowing Java to grow its heap while it is running causes
problems when another process is using memory.

- Peter


I always  restart tomcat when adding heap memory..

Independently of the rest of the issue, I think that what Peter was 
telling you, is to use for example : -Xms1024M -Xmx1024M

In other words, keep these two parameters equal.
That will cause the JVM to allocate the 1024M to the heap right at the 
beginning, and keep the heap always at the same size.

Otherwise :
1) the JVM which runs Tomcat will start with 512M for the heap, but may 
have a problem later, when it needs more, tries to get it from the Xen 
VM where it is running, and (maybe) cannot get it then.
2) when the two parameters are not equal, the JVM regularly tries to 
"adjust" the size of the heap dynamically.  This costs some performance.

When the parameters are equal, this dynamic adjustment work does not happen.

Another question : are all the components which are involved here, 
capable of using 32 GB of RAM ?
I don't know what exactly matters here, but maybe there are 32/64 bit 
issues somewhere.





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread Peter Crowther
On 30 March 2010 16:45, Caldarale, Charles R wrote:

> > From: peter.crowth...@googlemail.com
> > [mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther
> > Subject: Re: Virtualization (Xen, vmware) + Tomcat
> >
> > > Error occurred during initialization of VM
> > > Could not reserve enough space for object heap
> >
> > OK, so that's the Java virtual machine running Tomcat not
> > being able to extend its heap.
>
> Actually, that's the JVM trying to allocate the *initial* space for the
> heap, not extend it.  There hasn't been any attempt to load and run Tomcat
> yet.
>
>
> My mistake.  In that case, if Eric's seeing lots of those in the log files,
it implies that the JVM intended to host Tomcat is repeatedly failing to
start and some other process is repeatedly trying to start Tomcat.

Eric, could you tell us more about your statement that "Tomcat is running
inside the VM and is, by the way, a cPanel"?
- What operating system?
- What version of Tomcat?
- Did you download the Tomcat directly from http://tomcat.apache.org, or was
it packaged with some third-party software?

In particular, if it's a version of Tomcat that was packaged with cPanel,
you may well be better asking them about the issue.

- Peter


Re: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread Eric Laflamme
Hi Peter,

Thank you for you answer..


Le 2010-03-30 à 11:37, Peter Crowther a écrit :

> There are two uses of "virtual machine" here.  I'll distinguish the Java
> virtual machine and the Xen virtual machine.

Yes, I'm talking more of Xen VM.


> 
> On 30 March 2010 16:29, Eric Laflamme  wrote:
> 
>> We have a lot of server using virtualization (xen source) and we have a lot
>> of problem with tomcat. Tomcat process seems to stop responding after
>> undetermined time and write in loop this in the catalina.out:
>> 
>> Error occurred during initialization of VM
>> Could not reserve enough space for object heap
>> 
> 
> OK, so that's the Java virtual machine running Tomcat not being able to
> extend its heap.
> 
> Is Tomcat running inside a Xen VM?  If so, how much memory is allocated to
> the Xen VM?

Yes Tomcat is running inside the VM and is, by the way, a cPanel.

> 
>> 
>> The servers has 32 gig of ram so it's not the ram that is in need.
> 
> 
> *Which* server?  The host for your Xen virtual machines, or a particular Xen
> virtual machine?

The host have 32 gig of ram but we allocated all of them to the only vm 
running. So tomcat is running in a vm that have 32 gig of ram.

> 
> 
>> We tried to specifiy the memory for tomcat like:
>> 
>> -Xmx1024M
>> -Xms512M
>> 
>> But nothing seems to help. Does anybody have any ideas for this behaviour?
>> 
>> Keep -Xms and -Xmx the same.  If you do that, Java will allocate all the
> heap as it starts.  You will either get a failure at startup (which is
> easier to deal with) or the heap memory will be allocated.

We try all kind of allocation and the problem isn't showing at startup.. It 
happen only after few hours. If this can help, it can happen on a server that 
doesn't contain any data.. A fresh install of Cpanel and after few hours, it 
can happen..

> 
> As you have found, allowing Java to grow its heap while it is running causes
> problems when another process is using memory.
> 
> - Peter

I always  restart tomcat when adding heap memory..

Thank you.

Eric L.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread Caldarale, Charles R
> From: peter.crowth...@googlemail.com
> [mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther
> Subject: Re: Virtualization (Xen, vmware) + Tomcat
> 
> > Error occurred during initialization of VM
> > Could not reserve enough space for object heap
> 
> OK, so that's the Java virtual machine running Tomcat not 
> being able to extend its heap.

Actually, that's the JVM trying to allocate the *initial* space for the heap, 
not extend it.  There hasn't been any attempt to load and run Tomcat yet.
 
 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread Peter Crowther
There are two uses of "virtual machine" here.  I'll distinguish the Java
virtual machine and the Xen virtual machine.

On 30 March 2010 16:29, Eric Laflamme  wrote:

> We have a lot of server using virtualization (xen source) and we have a lot
> of problem with tomcat. Tomcat process seems to stop responding after
> undetermined time and write in loop this in the catalina.out:
>
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
>

OK, so that's the Java virtual machine running Tomcat not being able to
extend its heap.

Is Tomcat running inside a Xen VM?  If so, how much memory is allocated to
the Xen VM?

>
> The servers has 32 gig of ram so it's not the ram that is in need.


*Which* server?  The host for your Xen virtual machines, or a particular Xen
virtual machine?


> We tried to specifiy the memory for tomcat like:
>
> -Xmx1024M
> -Xms512M
>
> But nothing seems to help. Does anybody have any ideas for this behaviour?
>
> Keep -Xms and -Xmx the same.  If you do that, Java will allocate all the
heap as it starts.  You will either get a failure at startup (which is
easier to deal with) or the heap memory will be allocated.

As you have found, allowing Java to grow its heap while it is running causes
problems when another process is using memory.

- Peter


RE: Virtualization (Xen, vmware) + Tomcat

2010-03-30 Thread Caldarale, Charles R
> From: Eric Laflamme [mailto:elafla...@iweb.com]
> Subject: Virtualization (Xen, vmware) + Tomcat
> 
> Error occurred during initialization of VM
> Could not reserve enough space for object heap

That would indicate you're not allocating enough virtualized memory to the 
virtual server - that's your configuration error in Xen or VMware, nothing to 
do with Tomcat.

> The servers has 32 gig of ram so it's not the ram that is in need.

The amount of RAM is irrelevant, other than as a performance constraint.

> tried to specifiy the memory for tomcat like:
> 
> -Xmx1024M
> -Xms512M

Giving the JVM 1 GB of heap space will likely require at least 2 GB of memory 
for the virtual machine.  Again, it's your virtual machine configuration that's 
inadequate, not anything you're doing with Tomcat.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org