Memory fully used by Java ConcurrentHashMap (under Tomcat)

I use ConcurrentHashMap as a stack of memory (as a cache) that consist of nothing but a static ConcurrentHashMap (CHM).

All incoming HTTP request data are first store in this ConcurrentHashMap. And there is a process of asynchronous scheduler which takes the data from the same ConcurrentHashMap and remove the key.value after their storage in the database.

This system works very well and smooth, but just discovered under the following criteria, memory has been fully exploited (2.5 GB) and all time CPU was taken to run GC:
-1000/s simultaneous http call
-maintain the same competitor affected for a period of 15 minutes

The asynchronous process connect the remaining size of the CHM everytime he delete records and written in the database successfully. The (remaining) CHM.size maintain around minute: 300 to the Max: 3500

I thought that there is a leak memory on this application. So I used Eclipse MAST at the Dump of the heap. After you run the report suspect, I received these comments from MATT:
One instance of 'org.apache.catalina.session.StandardManager' loaded 'org.apache.catalina.loader.StandardClassLoader @ 0x853f0280' occupies 2,135,429,456 bytes (94,76%). The memory accumulates in one instance of "java.util.concurrent.ConcurrentHashMap$ Segment [of] ' charge by '< system class loader >.

+ retain 3 646 166 case of java.util.concurrent.ConcurrentHashMap$ Segment > = 2,135,429,456 bytes. +

The 0 length above I have translate the record length as vacuum inside the CHM (whenever I call the method CHM.remove ()). It is the number of record inside the database, 3 646 166 records was inside the database when this discharge was created

The strange scenario is: if I stop the stress test, the use of heap memory will be released gradually up to 25 MB. It takes about 30-45 minutes.

Here are the questions:

(1) not that looks like a memory leak?

(2) each Delete call remove (Object key, Object) value to remove a key: value <>of the CHM, done that get deleted object GC?

(3) could be possible because all my references are hard reference? My understanding is as long as the HTTP session is over, all the variables which is not static are now available for GC.

(4) an idea to solve this problem is very appreciated! :)

Note: I tried to replace the CHM with ehcache 2.2.0, but I get the same problem of OutOfMemoryException. I guess that ehcache is also using ConcurrentHashMap.

Specification of the server:
-Xeon Quad core, 8 wires.
-4 GB of memory
-Windows 2008 R2
-Tomcat 6.0.29

Published by: user6163504 on October 21, 2010 04:32

@Op. What happens if you run the test without your cache? It could be your web server that is not cleaning entered because such sessions has not expired.

Tags: Java

Similar Questions

  • Display on a monitor is not fully used. What should do?

    I recently bought a Mac mini (end of 2014)

    OS X 10.11.5 (15F34)

    I use a Samsung 19 inch monitor via mini display port to VGA.

    But the screen is not fully used (black on both right and left of the picture)

    When I go to about this mac > display, this is show 13.9 inch (800 x 600). I changed the resolution of 1280 x 1024 through the display preferences. But it is still not working and this mac > display, shows always 13.9 inch (800 x 600). The image is blurred.

    Help, please...

    You may need to buy a graphics card in order to use a different port on the computer.

    Check the display to see if there are other options of the signal may use another cable.

    A more recent model computer should be able to use a modern with Thunderbolt screen

    connections; Some cables with ends adapter for use with older screens may work

    If the display can be used in this way. Not all of the same works if an adapter may adapt to the form.

    • Apple Mini DisplayPort adapter: Frequently asked questions (FAQ) - Apple Support

    While I have two Mac Mini computers, one is a late 2005 and the other end 2012;

    both can use an HDMI adapter for a 19 inch Samsung works for these at full resolution.

    Mini-Display port to HDMI it works; If not, using lightning.

    One of my screens use one of these cards:

    Apple Mini DisplayPort to DVI adapter

    Some display models require pilots who would be obscure and not included with

    OS X; I have another Samsung that turns, it is supported but you must use a third-

    part control panel app in the old OS X 10.5.8 and OS X 10.9.5. The X OS

    controls brightness and resolution are limited without it.

    {Since the new Mac Mini is more beautiful with a movie theater 20 inch aluminum, it's what}

    He has; the older Mini OK with a Samsung 19 inch (square), and it uses

    control software for OS X settings cannot. Most recent can use Thunderbolt.}

    Not sure if your screen is oldest of those who may need a separate control software.

    There is a updated firmware for Mini Display Port to VGA (himself):

    On the Mini DisplayPort to VGA adapter firmware update - Apple Support

    If you see not all possible display resolutions in displays preferences

    It may be due to the absence of a favorite graphics card. Or a longer display limit.

    • The display of all the possible resolutions for viewing under Mac OS X:

    http://osxdaily.com/2015/08/27/show-all-display-resolutions-external-screen-Mac/

    • About the Mini DisplayPort to HDMI - Apple Support adapters

    You may need the machine support site to test technical research view if you

    not a page printed with line info specifications said. Several different adapters

    are available; You can even use a digital TV (limits) as screen.

    The technology of the adapter and display need to better match those of the Mini.

    Older tech display should be supported within the limits. Connections and drivers.

    PS: See if the update of the firmware of the adapter you have, will allow him to work.

    If the adapter is an Apple product, it would be able to accept the firmware.

    Good luck!

    edited 3 times

  • Can I use the Java edition?

    Hello
    I don't know if I have to use the Java or the 'normal' edition of the berkeley db.

    My application is developed in Java, but I don't use JTA, JCA or JMX.
    Is there an advantage to be taken using the Java edition?

    Thank you

    There are many minor differences, for example, I was a little bit better write performance, DB uses somewhat less memory, DB has a SQL interface and I does not. But overall, the two products are very similar, so for most of the questions you might ask, the answer is going to be "in respect of the same".

    If you want to choose the best product for your application, you will need to define very specific criteria that are most important to you. If you care more about make every ounce of performance on a specific part of the material, using a specific amount of memory, for a specific application (access model), then you will need to pass a test and make a comparison.

    -mark

  • I have a strange problem with my RAM supported by installers. When I check the activity monitor, 3 installers are open and they start around 80 MB memory RAM used for about 7 or 10:08 minutes or so.

    I have a strange problem with my RAM supported by installers. When I check the activity monitor, 3 installers are open and they start around 80 MB memory RAM used for about 7 or 8 concerts after 10 minutes. I have to force them to quit, but I don't know what I am closing or why they open in the first place. Applications downloaded on iTunes?

    In addition, the Console has opened with the same message several times, but I don't know what that means.

    Any help would be appreciated.

    Hello

    The last is a picture of the Terminal window.

    Just because it lists 'Console' does not mean that it has nothing to do with this application.

    You have not said why or what you're trying to install so I can't help with that.

    You can use the activity monitor to leave their.

    After you select an item, use the X in a type of stop sign icon and confirm force quit.

    21:36 Thursday; September 15, 2016

     iMac 2.5 Ghz i5 2011 (El Capitan)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro (Snow Leopard 10.6.8) 2 GB
     Mac OS X (10.6.8).
     iPhone and iPad (2)

  • I get a message: to use the 'java' command line tool, you must install a JDK.  I tried 10 times to install without success.  Help, please.

    I get a message: to use the 'java' command line tool, you must install a JDK.  I tried 10 times to install without success.  Help, please.

    You probably have some of the older than the needs/desires software legacy Java installed.

    Please see these sons of community message:

    After the installation of El Capitan, I get the message: to use the 'java' command line tool, you must install a JDK

    Just found this last Java does not work with El Capitan

    This is the Apple link to the legacy version of Java 6.

    Download Java for OS X 2015-001

    First of all, I would like to try to identify what application generated the next message and update (delete) this request as the case may be. If you need to run Java then, as the Apple Support page says it's certainly preferable that your installation of Java entirely up-to-date with the Oracle's Java course. If you can get without Java, you should install it not - like the Flash, it should not be installed unless you have no choice.

  • Wide screen is not fully used (Win XP, Service Pack 3)

    Bought a Monitor wide screen LCD (Asus VE276Q) to replace my existing LCD display.  RGA is an entry.

    Problem: The wide screen is not fully used.

    Symptom: When starting, during Win XP Welcome screen, it seems that takes full advantage of the wide screen.

    But when he moved to the office (or a web page), about 3 inches on the left and right sides are not used.

    What I tried: play with the buttons on the monitor, but may not have to work.

    Question: How can I get Win XP to fully use the display on the big screen?

    Thanks in advance for your help.

    Skip

    Hello

    Check the screen resolution and screen resolutions, you can check the links that holds information about the same:

    Change the resolution of your monitor: http://windows.microsoft.com/en-US/windows-xp/help/setup/change-monitor-resolution

    To change your screen resolution: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/display_change_screen_resolution.mspx?mfr=true

  • Error message: the software can be installed by using the command "run under...". ».

    I have amtrying to load the HP Photosmart D71000 series. Keep is error message: the software can be installed by using the command "run under...". ». Advice suggests logon as a user with administrator privileges. This was done and same message came.  Why?

    Try right click on the setup.exe > run as admin.

    If this does not work, try the Vista Hardware and drivers Forum:

    http://social.answers.Microsoft.com/forums/en-us/vistahardware/threads

    See you soon.

    Mick Murphy - Microsoft partner

  • Using blackberry Java native methods

    Hi all

    can anyone suggest me how to implement the native methods from java in blackberry apps. In singles, I have a C code, I want to use this code in my blackberry App when I google, I found that java supports the native to consume methods the

    Code of C/C++ in java applications. I want the same thing to do in my blackberry app.

    If someone implementd that kind of technique, so please give the steps or the way how to implement this.

    Verify that this son.

    http://supportforums.BlackBerry.com/T5/Java-development/JNI/m-p/41140

    http://supportforums.BlackBerry.com/T5/Java-development/can-we-use-JNI-Java-native-interface-approac...

  • Problem of having to re - blackBerry Smartphones format memory to use Blackberry 8330 as mass storage device

    So I created it for my BB Curve 8330 (Verizon Wireless service) last night.

    • I formatted the 2 GB micro SD card
    • I changed the drive letter to avoid a conflict
    • I have all the latest updates I know from this announcement. (4.5.0.77 on the phone itself)
    • List of media cards: support 'on', 'none', Mode of mass storage card encryption mode 'on', scoped the mass storage mode when connected to 'yes '.

    Everything was fine. Even had a few tunes out there to jam to.

    Not even 24 hours later, I wanted to add more music and photos to personalize the BB more far. So I plug it into the PC but my computer Vista OS won't let me access the memory card. The BB has popped up on the list of drives, but if I click it, it says I need to insert a memory card into the mass storage device.

    I go to the BB Desktop Manager and go to the media. I have almost the same question.

    Even with a pop of the battery, check the memory card using a card reader (card is good) and the reintegration of the memory card, the problem persisted. I had to re - format the memory card on the BB again (to wipe everything), and then when I plugged in the USB cord, I could access the card again in the mass storage device.

    Reformatting was not a big deal since it's not like anything on the card has not been already saved elsewhere. However, I really don't want to have to do that on a regular basis. I understand the technology hiccups every now and then, but if I have to do every time, it's going to be a pain in the rear.

    So all that being said, is there something that I forgot that I need to check or trouble so I don't have to constantly re - format my memory card and re-load all on it? I have tried to do everything that I could think of and I tried searching these forums very, but I had no luck (or did not use the appropriate search string) in the generation of responses.

    A card microSDHC fixed the problem. The old card memory, I got in it was a regular 2GB microSD card. I bought a 4 GB microSDHC card and the problems no longer exist.

    I wanted to get a card greater new anyway, so I'm glad that all worked where I didn't have to do anything unwanted. The old card memory is great; It would be not just works perfectly in my Blackberry. I'll give it to the lovely lady of the House, who can update the 1 GB card in her phone.

  • Use the java connector for the connector database?

    Hello

    I'm running on IOM 11gr2ps2 and need to use the database connector.  We installed the .net connector server to operate with the connector AD.

    The Oracle of https://docs.oracle.com/cd/E22999_01/doc.111/e20277.pdf documentation gives us an option to either install a java connector server to work with the database connector or install the IOM database connector without using a java connector server.

    The documentation says "execution of a connector on the connector server.

    allows to transmit queries put in service and reconciliation through the firewall in a

    as defined by the connector server.

    As I already have a connector server .net for AD, I would lean towards the installation of the java connector server.  In this way architecture remains consistent.

    Please, share your ideas.

    Thank you

    Khanh

    Table of database connector uses the Java Connector server, or it can be deployed directly in the container of the IOM.  If you have problems jar or different library due to database formats, you can use the connector server to isolate libraries and do not have to figure out how to make IOM in collaboration with several libraries.  It can also take some of the load on your server to IOM for the transformation.  I suggest to use the server connector for the isolation of the newspaper as well.

    -Kevin

  • Identify DIMM memory installed using PowerCLI

    Hi guys,.

    Does anyone know how identify the DIMM memory installed using PowerCLI?

    With the help of smboisDump, I get the following

    MEMORY: 25 #.

    Geographical area: "DIMM_A1.

    Bank: "CPU 1 CHANNEL 0 DIMM 1.

    Manufacturer: '0xCE00 '.

    Series: "35F3A656."

    Part number: "M393B1K70DH0-YH9".

    Matrix memory: #23

    Form factor: 0 x 09 (DIMM)

    Type: 0 x 18 (DDR3)

    Detail of type: 0 x 2000 (registered)

    Data width: 64-bit (bit ECC + 8)

    Size: 8 GB

    Speed: 1333 MHz

    I would like to be able to get this help PowerCLI, in particular the following information will be of interest

    • Location
    • Part number
    • Type
    • Size
    • Speed


    I need to perform upgrades memory for 50 5.5 ESXi hosts and prefer if I didn't have to read all the smboisDump files and manually copy and paste the information in Excel.

    I have looked at using get-esxcli and get-view but, do not know the correct attributes to select.


    Thank you


    OK, I seem to have bypassed the error.

    Although the CIM server on host Service showed the execution, I have restarted using the following

    CIMService = Get-VMHostService - VMHost $item | Where {$_.} Label - match "CIM Server"}

    Restart VMHostService - $CIMService HostService - confirm: $false


    After that, the previous code worked

    I found the following handy KB VMware http://kb.vmware.com/kb/1025757

    Another good blog for ESX material followed by using PowerShell is physical ESX followed with PowerShell - VMware PowerCLI Blog - Blogs from VMware

    and

    for the CIM of information https://www.vmware.com/support/developer/cim-sdk/smash/u3/ga/apirefdoc/

  • How much memory to use an instance of SOA?

    Hello!

    Is it possible to know how much memory is using an instance in Oracle SOA Working? Or at least, an application on a WebLogic Server?

    Greetings, Peter.

    Peter,

    You can monitor the memory usage of all JVM running the application server, but there is no way to understand that the amount of memory has been attributed to a particular application / instance running on this server.

    Kind regards
    Anuj

  • Get the error: SCAC-50012 when using the Java activity

    Hello

    I use Jdeveloper 11.1.1.4.0. I use a Java integration activity in my BPEL and when I compile the project, I got an error -error: SCAC-50012


    The code I use in activity integration of Java is


    ______________________________________________________________________________________________

    java.lang.String TraceLogMessage = null;
    java.lang.Boolean tracelogenabled;
    java.lang.String title (java.lang.String) = getVariableData ("Title");
    java.lang.String instanceID = (java.lang.String) getVariableData ("InstanceID");
    java.lang.String serviceName = (java.lang.String) getVariableData ("ServiceName");

    tracelogenabled = oracle.apps.aia.core.eh.logging.AIALogger.isTraceLoggingEnabled ("INFO", "http://xmlns.oracle.com/ExecuteSalesOrderFulfillmentDeviceUpdateEBF");
    setVariableData ("TraceLogEnabled", tracelogenabled);

    If (tracelogenabled.booleanValue ())
    {


    TraceLogMessage = "Start" + serviceName + "Instance:" instanceID + title;

    oracle.apps.aia.core.eh.logging.AIALogger.logTraceMessage ("INFO", null, TraceLogMessage);

    }

    ______________________________________________________________________________________________

    I imported the following bpel but there is no chance...


    < bpelx:exec import="java.util.logging.Logger"/ >
    < bpelx:exec import="java.util.logging.Level"/ >
    < bpelx:exec import="oracle.fabric.logging.LogFormatter"/ >
    < bpelx:exec import="org.w3c.dom.*"/ >
    < bpelx:exec import="oracle.xml.parser.v2.XMLElement"/ >
    < bpelx:exec import="java.util.*"/ >
    < bpelx:exec import="java.lang.*"/ >
    < bpelx:exec import="java.math.*"/ >
    < bpelx:exec import="java.io.*"/ >
    < bpelx:exec import="oracle.soa.common.util.Base64Decoder"/ >


    Please help me with this...

    Thank you and best regards,
    Suman

    Hello

    Have you checked the scac log files in your project JDev SCA-INF/classes directory? There could be vital information in these tell you what the problem is.

    Concerning

    Lars

  • using the java plugin instead of jinitiator

    Hello

    I am using a java plugin instead of jinitiator because I switch to ubuntu.
    I tried the plugin java-sun6 - both the OpenJDK, Icedtea plugin but I have the same problem in both entities, the application is running, but no icons appear.
    I was wondering if this could have something to do with the versions from the jinitiator used was 1.1.8.16, and the plugins I've tried are sun-java6 - plugin:6.22 and icedtea6 - plugin:6 b 20 - 1.9.2 - 0ubuntu1.

    Thank you
    Mara

    Hello

    Please disable Windows Explorer blocker.
    hope this helps you.

    Sarah

  • using two instructions updated under a single button

    Hello
    I want to know if we can use two instructions update under a single button (when the button is pressed the shutter);

    in fact, the thing is when I press the button BOOK...

    the first statement updates the TRANSIT value with the sum of reserved posts to...

    the second update statement will deduct the value of the items available...

    ex:
    Sum of reserved point: 4
    Available: 14

    First update:
    Public transport: 4

    Second update:
    Avaiable: 14-5 = 10

    Suhail Faraaz says:
    Hello
    I want to know if we can use two instructions update under a single button (when the button is pressed the shutter);

    in fact, the thing is when I press the button BOOK...

    the first statement updates the TRANSIT value with the sum of reserved posts to...

    the second update statement will deduct the value of the items available...

    ex:
    Sum of reserved point: 4
    Available: 14

    First update:
    Public transport: 4

    Second update:
    Avaiable: 14-5 = 10

    Hello

    You can have two and also more updates of the statements under a single button, there is no problem, just check the condition for the update and corresponding to the value in the display :)

Maybe you are looking for

  • Active window loses focus

    All past this problem recently. It began not with an upgrade of the OS, if I had just restarted the computer after having been passed away on a trip. The active window, I have been working in suddenly loses focus, sometimes in the middle of a Word, I

  • Dictation (voice to text) in French?

    Is it possible to change the dictation (voice to text) at the exit of the French?

  • Arial font setting

    How can I fix it: I also tried this, but it does not help:

  • High CPU and lag/freezing until the DVD tray is open

    A very strange thing that happens shortly after I burn or rip a CD.  After the burn/rip is finished and the tray ejects, I remove the CD and close the drawer.  Soon after, the computer's processor runs high 80 to 100% and everthing lags / freezes.  I

  • How to dimensionnera the JPG in Illustrator image?

    I have skills that are very basic in Illustrator, but known 'reasonably' in Photoshop. I am now trying to create a version vector logo in Illustrator, but the logo contains an image raster JPG for example.My question is how this part of the logo dime