You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christovam Paynes Silva <ch...@gmail.com> on 2012/08/17 23:41:37 UTC

Fwd: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled

---------- Forwarded message ----------
From: Christovam Paynes Silva <ch...@gmail.com>
Date: 2012/8/17
Subject: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full.
Compiler has been disabled
To: users-help@tomcat.apache.org





Hello Guys,

I'm using an Ubuntu 11.10 - 64 bits and a tomcat 7.0.27 with jdk 1.7.0_05
the Oracle
and is showing me the following messages on memory leak or lack of space
due to not rotate the objects that are in memory of tomcat (as I read the
documentation for the oracle this option was to do this "-XX: +
UseCodeCacheFlushing" but is not) and so he stops working, so I need to
restart the service!
But as a production system that is complicated, and takes place 20-30
minutes, the delay times more ..

performed various types of settings in catalina.sh for tomcat to clear the
cache and garbage, I increased the memory, but these settings are only
postponing my problem ... someone has an idea what I can do about the
application and the server?

Follow the logs of what happens:

 mmap failed for CEN and END part of zip file ..

   Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler
has been disabled.
   Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache
size using -XX:ReservedCodeCacheSize=
   Code Cache  [0x00007f630d6f8000, 0x00007f630dc98000, 0x00007f63106f8000)
   total_blobs=2561 nmethods=1767 adapters=449 free_code_cache=43457Kb
largest_free_block=44434048


catalina.sh following settings:

JAVA_OPTS="-Dfile.encoding=
ISO-8859-1 -Duser.timezone=America/Sao_Paulo -server -Xms700m -Xmx1100m
-XX:PermSize=626m -XX:MaxPermSize=826m -XX:+UseCodeCacheFlushing
-XX:ReservedCodeCacheSize=264m -XX:CodeCacheFlushingMinimumFreeSpace=50m"


Already have also used these options to log in and the results show me that
collecting garbage "Full GC"

-Xloggc:/usr/local/tomcat7/logs/gc.log -XX:+PrintHeapAtGC
-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:-HeapDumpOnOutOfMemoryError


.166: [Full GC (System) [PSYoungGen: 4406K->0K(209088K)] [ParOldGen:
64K->4252K(477888K)] 4470K->4252K(686976K) [PSPermGen:
9753K->9750K(641024K)], 0.0497130 secs] [Times: user=0.06 sys=0.01,
real=0.05 secs]
Heap after GC invocations=2 (full 1):

Collections:

30.508: [GC [PSYoungGen: 209087K->29810K(187136K)]
330012K->176456K(665024K), 0.1144700 secs] [Times: user=0.12 sys=0.11,
real=0.11 secs]
Heap after GC invocations=7 (full 1):
 PSYoungGen      total 187136K, used 29810K [0x00000000e9160000,
0x0000000100000000, 0x0000000100000000)

1.166: [Full GC (System) [PSYoungGen: 4406K->0K(209088K)] [ParOldGen:
64K->4252K(477888K)] 4470K->4252K(686976K) [PSPermGen:
9753K->9750K(641024K)], 0.0497130 secs] [Times: user=0.06 sys=0.01,
real=0.05 secs]

Thank you

Re: Fwd: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christovam,

On 8/22/12 12:39 PM, Christovam Paynes Silva wrote:
> Before you even set the environment variables, I already had this 
> problem with the cache.

Okay, good to know.

> How was using jdk1.0.5, I upgraded to 1.0.7 jdk

AFAICT, neither of those are legal version numbers. What actual
versions of the Java Development Kit are you testing?

> messages of "Java HotSpot (TM) 64-Bit Server VM warning: CodeCache 
> is full. Compiler Has Been disabled", disappeared, however some 
> images not loading the application. Then I read about this BUG:
> 
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166379 
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7170971

Looks like you need to update to build 1.7.0_06 which is already
available. It also looks like you can probably drop the "code cache"
settings and leave them to the default.

> I'll look on this environment variable "CATALINA_OPTS"

Please do. The best place to read about CATALINA_OPTS is in the
bin/catalina.sh file where those environment variables are all
documented quite nicely.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA1JioACgkQ9CaO5/Lv0PClfQCfcj5YAdlttfLif92C4GpKoBB/
bDwAoLIvTxMdaVDHJE5f4+wdNlPM5bn4
=gJza
-----END PGP SIGNATURE-----

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


Re: Fwd: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled

Posted by Christovam Paynes Silva <ch...@gmail.com>.
Hello Christopher,

Before you even set the environment variables, I already had this problem
with the cache. How was using jdk1.0.5, I upgraded to 1.0.7 jdk, messages
of "Java HotSpot (TM) 64-Bit Server VM warning: CodeCache is full. Compiler
Has Been disabled", disappeared, however some images not loading the
application. Then I read about this BUG:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166379
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7170971

I'll look on this environment variable "CATALINA_OPTS"



2012/8/22 Christopher Schultz <ch...@christopherschultz.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Christovam,
>
> On 8/17/12 5:41 PM, Christovam Paynes Silva wrote:
> > catalina.sh following settings:
>
> FYI it's better to create a bin/setenv.sh and set your environment
> variables, there.
>
> >
> > JAVA_OPTS="-Dfile.encoding= ISO-8859-1 ..."
>
> One more nit to pick: you want to set CATALINA_OPTS instead of
> JAVA_OPTS. If you use JAVA_OPTS, then you are setting a 1GiB heap for
> the process that merely sends "shutdown" commands to Tomcat.
>
> > -Duser.timezone=America/Sao_Paulo -server -Xms700m -Xmx1100m
> > -XX:PermSize=626m -XX:MaxPermSize=826m -XX:+UseCodeCacheFlushing
> > -XX:ReservedCodeCacheSize=264m
> > -XX:CodeCacheFlushingMinimumFreeSpace=50m"
>
> Finally, why are you even specifying the code-cache sizes at all? Do
> you have these problems when you remove *all* of the code-cache
> configuration parameters from your _OPTS environment variables?
>
> Generally speaking, there's no reason to adjust such settings unless
> you are actually having a problem. Maybe you started having
> code-cache-related problems before you added those settings, but you
> didn't say that so I assume it's not true. Instead, I assume that you
> are fiddling with settings that you don't need to set.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlA1BNIACgkQ9CaO5/Lv0PAYtgCfQpcJdnvvX8tZD0T73qDPCBcj
> r+sAmQHy90LQp6IpJLDaroGXRawJ0Bp3
> =Ci1j
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Fwd: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christovam,

On 8/17/12 5:41 PM, Christovam Paynes Silva wrote:
> catalina.sh following settings:

FYI it's better to create a bin/setenv.sh and set your environment
variables, there.

> 
> JAVA_OPTS="-Dfile.encoding= ISO-8859-1 ..."

One more nit to pick: you want to set CATALINA_OPTS instead of
JAVA_OPTS. If you use JAVA_OPTS, then you are setting a 1GiB heap for
the process that merely sends "shutdown" commands to Tomcat.

> -Duser.timezone=America/Sao_Paulo -server -Xms700m -Xmx1100m 
> -XX:PermSize=626m -XX:MaxPermSize=826m -XX:+UseCodeCacheFlushing 
> -XX:ReservedCodeCacheSize=264m
> -XX:CodeCacheFlushingMinimumFreeSpace=50m"

Finally, why are you even specifying the code-cache sizes at all? Do
you have these problems when you remove *all* of the code-cache
configuration parameters from your _OPTS environment variables?

Generally speaking, there's no reason to adjust such settings unless
you are actually having a problem. Maybe you started having
code-cache-related problems before you added those settings, but you
didn't say that so I assume it's not true. Instead, I assume that you
are fiddling with settings that you don't need to set.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA1BNIACgkQ9CaO5/Lv0PAYtgCfQpcJdnvvX8tZD0T73qDPCBcj
r+sAmQHy90LQp6IpJLDaroGXRawJ0Bp3
=Ci1j
-----END PGP SIGNATURE-----

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


Re: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled

Posted by Christovam Paynes Silva <ch...@gmail.com>.
Hello,
I already searched on "mmap failed for CEN and END part of zip file"
however found
nothing relevant to my case.

Oo I'll use JProfiler to verify the application, because it seems to be not
properly cleaning the "GC", connections can be opened from hibernate or
something similar. Tomcat seems to be right.
As for the video I'm struggling to understand because I'm from Brazil.

Thanks for now and if you know of any other tips I appreciate it!


2012/8/18 Leon Rosenberg <ro...@gmail.com>

> Hello,
>
> have you googled for
> mmap failed for CEN and END part of zip file ?
> It produces a lot of results.
> Your error message point to a JIT problem, when JIT has no more space
> to compile it stops compiling and the application becomes slow.
> However, you already seems to set the proper options, so maybe its
> another bug, or your app is just HUGE.
> Do you add code after start?
> You may want to have a look at
> http://www.infoq.com/presentations/Extreme-Performance-Java he
> (Charlie Hunt) covers this topic near the end of the presentation. At
> least you may get a better grip on what's going on and where to
> search.
>
> regards
> Leon
>
> On Fri, Aug 17, 2012 at 11:41 PM, Christovam Paynes Silva
> <ch...@gmail.com> wrote:
> > ---------- Forwarded message ----------
> > From: Christovam Paynes Silva <ch...@gmail.com>
> > Date: 2012/8/17
> > Subject: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full.
> > Compiler has been disabled
> > To: users-help@tomcat.apache.org
> >
> >
> >
> >
> >
> > Hello Guys,
> >
> > I'm using an Ubuntu 11.10 - 64 bits and a tomcat 7.0.27 with jdk 1.7.0_05
> > the Oracle
> > and is showing me the following messages on memory leak or lack of space
> > due to not rotate the objects that are in memory of tomcat (as I read the
> > documentation for the oracle this option was to do this "-XX: +
> > UseCodeCacheFlushing" but is not) and so he stops working, so I need to
> > restart the service!
> > But as a production system that is complicated, and takes place 20-30
> > minutes, the delay times more ..
> >
> > performed various types of settings in catalina.sh for tomcat to clear
> the
> > cache and garbage, I increased the memory, but these settings are only
> > postponing my problem ... someone has an idea what I can do about the
> > application and the server?
> >
> > Follow the logs of what happens:
> >
> >  mmap failed for CEN and END part of zip file ..
> >
> >    Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler
> > has been disabled.
> >    Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code
> cache
> > size using -XX:ReservedCodeCacheSize=
> >    Code Cache  [0x00007f630d6f8000, 0x00007f630dc98000,
> 0x00007f63106f8000)
> >    total_blobs=2561 nmethods=1767 adapters=449 free_code_cache=43457Kb
> > largest_free_block=44434048
> >
> >
> > catalina.sh following settings:
> >
> > JAVA_OPTS="-Dfile.encoding=
> > ISO-8859-1 -Duser.timezone=America/Sao_Paulo -server -Xms700m -Xmx1100m
> > -XX:PermSize=626m -XX:MaxPermSize=826m -XX:+UseCodeCacheFlushing
> > -XX:ReservedCodeCacheSize=264m -XX:CodeCacheFlushingMinimumFreeSpace=50m"
> >
> >
> > Already have also used these options to log in and the results show me
> that
> > collecting garbage "Full GC"
> >
> > -Xloggc:/usr/local/tomcat7/logs/gc.log -XX:+PrintHeapAtGC
> > -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
> -XX:-HeapDumpOnOutOfMemoryError
> >
> >
> > .166: [Full GC (System) [PSYoungGen: 4406K->0K(209088K)] [ParOldGen:
> > 64K->4252K(477888K)] 4470K->4252K(686976K) [PSPermGen:
> > 9753K->9750K(641024K)], 0.0497130 secs] [Times: user=0.06 sys=0.01,
> > real=0.05 secs]
> > Heap after GC invocations=2 (full 1):
> >
> > Collections:
> >
> > 30.508: [GC [PSYoungGen: 209087K->29810K(187136K)]
> > 330012K->176456K(665024K), 0.1144700 secs] [Times: user=0.12 sys=0.11,
> > real=0.11 secs]
> > Heap after GC invocations=7 (full 1):
> >  PSYoungGen      total 187136K, used 29810K [0x00000000e9160000,
> > 0x0000000100000000, 0x0000000100000000)
> >
> > 1.166: [Full GC (System) [PSYoungGen: 4406K->0K(209088K)] [ParOldGen:
> > 64K->4252K(477888K)] 4470K->4252K(686976K) [PSPermGen:
> > 9753K->9750K(641024K)], 0.0497130 secs] [Times: user=0.06 sys=0.01,
> > real=0.05 secs]
> >
> > Thank you
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled

Posted by Leon Rosenberg <ro...@gmail.com>.
Hello,

have you googled for
mmap failed for CEN and END part of zip file ?
It produces a lot of results.
Your error message point to a JIT problem, when JIT has no more space
to compile it stops compiling and the application becomes slow.
However, you already seems to set the proper options, so maybe its
another bug, or your app is just HUGE.
Do you add code after start?
You may want to have a look at
http://www.infoq.com/presentations/Extreme-Performance-Java he
(Charlie Hunt) covers this topic near the end of the presentation. At
least you may get a better grip on what's going on and where to
search.

regards
Leon

On Fri, Aug 17, 2012 at 11:41 PM, Christovam Paynes Silva
<ch...@gmail.com> wrote:
> ---------- Forwarded message ----------
> From: Christovam Paynes Silva <ch...@gmail.com>
> Date: 2012/8/17
> Subject: Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full.
> Compiler has been disabled
> To: users-help@tomcat.apache.org
>
>
>
>
>
> Hello Guys,
>
> I'm using an Ubuntu 11.10 - 64 bits and a tomcat 7.0.27 with jdk 1.7.0_05
> the Oracle
> and is showing me the following messages on memory leak or lack of space
> due to not rotate the objects that are in memory of tomcat (as I read the
> documentation for the oracle this option was to do this "-XX: +
> UseCodeCacheFlushing" but is not) and so he stops working, so I need to
> restart the service!
> But as a production system that is complicated, and takes place 20-30
> minutes, the delay times more ..
>
> performed various types of settings in catalina.sh for tomcat to clear the
> cache and garbage, I increased the memory, but these settings are only
> postponing my problem ... someone has an idea what I can do about the
> application and the server?
>
> Follow the logs of what happens:
>
>  mmap failed for CEN and END part of zip file ..
>
>    Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler
> has been disabled.
>    Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache
> size using -XX:ReservedCodeCacheSize=
>    Code Cache  [0x00007f630d6f8000, 0x00007f630dc98000, 0x00007f63106f8000)
>    total_blobs=2561 nmethods=1767 adapters=449 free_code_cache=43457Kb
> largest_free_block=44434048
>
>
> catalina.sh following settings:
>
> JAVA_OPTS="-Dfile.encoding=
> ISO-8859-1 -Duser.timezone=America/Sao_Paulo -server -Xms700m -Xmx1100m
> -XX:PermSize=626m -XX:MaxPermSize=826m -XX:+UseCodeCacheFlushing
> -XX:ReservedCodeCacheSize=264m -XX:CodeCacheFlushingMinimumFreeSpace=50m"
>
>
> Already have also used these options to log in and the results show me that
> collecting garbage "Full GC"
>
> -Xloggc:/usr/local/tomcat7/logs/gc.log -XX:+PrintHeapAtGC
> -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:-HeapDumpOnOutOfMemoryError
>
>
> .166: [Full GC (System) [PSYoungGen: 4406K->0K(209088K)] [ParOldGen:
> 64K->4252K(477888K)] 4470K->4252K(686976K) [PSPermGen:
> 9753K->9750K(641024K)], 0.0497130 secs] [Times: user=0.06 sys=0.01,
> real=0.05 secs]
> Heap after GC invocations=2 (full 1):
>
> Collections:
>
> 30.508: [GC [PSYoungGen: 209087K->29810K(187136K)]
> 330012K->176456K(665024K), 0.1144700 secs] [Times: user=0.12 sys=0.11,
> real=0.11 secs]
> Heap after GC invocations=7 (full 1):
>  PSYoungGen      total 187136K, used 29810K [0x00000000e9160000,
> 0x0000000100000000, 0x0000000100000000)
>
> 1.166: [Full GC (System) [PSYoungGen: 4406K->0K(209088K)] [ParOldGen:
> 64K->4252K(477888K)] 4470K->4252K(686976K) [PSPermGen:
> 9753K->9750K(641024K)], 0.0497130 secs] [Times: user=0.06 sys=0.01,
> real=0.05 secs]
>
> Thank you

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