Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2469A200C00 for ; Wed, 18 Jan 2017 15:11:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 230D1160B3A; Wed, 18 Jan 2017 14:11:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 47262160B34 for ; Wed, 18 Jan 2017 15:11:29 +0100 (CET) Received: (qmail 19355 invoked by uid 500); 18 Jan 2017 14:11:05 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 17835 invoked by uid 99); 18 Jan 2017 14:10:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2017 14:10:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 84370C0748 for ; Wed, 18 Jan 2017 14:10:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.8 X-Spam-Level: X-Spam-Status: No, score=0.8 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id NzsrtbxgQyqo for ; Wed, 18 Jan 2017 14:10:26 +0000 (UTC) Received: from thor.wissensbank.com (thor.wissensbank.com [81.169.250.120]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E9AEB5F2EF for ; Wed, 18 Jan 2017 14:10:25 +0000 (UTC) Received: from thor.wissensbank.com (localhost [127.0.0.1]) by thor.wissensbank.com (Postfix) with ESMTP id 9BDEF15A612F0 for ; Wed, 18 Jan 2017 15:10:20 +0100 (CET) Received: by thor.wissensbank.com (Postfix, from userid 500) id 88E1515A61361; Wed, 18 Jan 2017 15:10:20 +0100 (CET) Received: from [192.168.245.129] (pd956abfc.dip0.t-ipconnect.de [217.86.171.252]) (Authenticated sender: andre.warnier@ice-sa.com) by thor.wissensbank.com (Postfix) with ESMTPA id B4C9615A612F0 for ; Wed, 18 Jan 2017 15:10:19 +0100 (CET) Subject: Re: Cannot Allocate Memory errno=12 To: users@tomcat.apache.org References: <587F6877.6000104@ice-sa.com> <587F6AAC.4090705@ice-sa.com> <587F6E1E.8010506@ice-sa.com> <587F72EF.4060605@ice-sa.com> From: =?UTF-8?Q?Andr=c3=a9_Warnier_=28tomcat=29?= Message-ID: <587F774A.8050900@ice-sa.com> Date: Wed, 18 Jan 2017 15:10:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <587F72EF.4060605@ice-sa.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP archived-at: Wed, 18 Jan 2017 14:11:30 -0000 On 18.01.2017 14:51, André Warnier (tomcat) wrote: > Actually, I think that you need to look closer at the tomcat shutdown scripts on your > system, and their settings. > If I remember correctly, when you call the tomcat shutdown script, it actually starts > another java JVM instance, just to send a shutdown message to the running tomcat's JVM. > And with your current JAVA_OPTS, it looks like this shutdown JVM is also requesting a Java > heap with an initial size of 8 GB. And that is what may trigger this OOM. > There is something in that area about the difference between JAVA_OPTS and CATALINA_OPTS. > Additional information : (I have now found it again) Somewhere in your tomcat software directory (which may be anywhere, depending on where you got this tomcat from), there is a file named "RUNNING.txt". In this file is a section which I copy below here, in case you are having trouble finding it. It explains what happens with these JAVA_OPTS and CATALINA_OPTS environment variables. In particular the last paragraph. quote ... (3.3) Other variables (optional) Other environment variables exist, besides the four described above. See the comments at the top of catalina.bat or catalina.sh scripts for the list and a description of each of them. One frequently used variable is CATALINA_OPTS. It allows specification of additional options for the java command that starts Tomcat. See the Java documentation for the options that affect the Java Runtime Environment. See the "System Properties" page in the Tomcat Configuration Reference for the system properties that are specific to Tomcat. A similar variable is JAVA_OPTS. It is used less frequently. It allows specification of options that are used both to start and to stop Tomcat as well as for other commands. Note: Do not use JAVA_OPTS to specify memory limits. You do not need much memory for a small process that is used to stop Tomcat. Those settings belong to CATALINA_OPTS. unquote > > On 18.01.2017 14:31, André Warnier (tomcat) wrote: >> On 18.01.2017 14:20, Fady Haikal wrote: >>> plz find it on the below link >>> >>> https://drive.google.com/file/d/0By0Z6xkBVBFHVGJKVkRqM2hwUVE/view?usp=sharing >> >> Hmm, that's a nice logfile. >> It also starts with a number of hints and recommendations, did you see ? >> >> Very generically : >> When tomcat is shutting down, it does need some extra memory for a while, to run the >> shutdown processes (in addition to the other processes which are running). >> So it asks the Java JVM for more memory. >> And then the java JVM asks the OS for that extra memory. >> And in your case, it does not get it, because the OS is telling it that there is no more >> available memory. So the JVM crashes. >> Now why there is no more memory available at that time, is mostly for you to find out. >> There are certainly other processes running on that server, in addition to tomcat's java >> JVM. They use memory too. >> >> And otherwise, either you need a bigger system, or you need smaller applications. >> >>> >>> On Wed, Jan 18, 2017 at 3:16 PM, André Warnier (tomcat) wrote: >>>> On 18.01.2017 14:08, Fady Haikal wrote: >>>>> >>>>> Yes log already sent, anw attached >>>> >>>> >>>> Well no. Only the "setenv.sh" was attached. >>>> This list server strips many attachments. Maybe you need to paste the >>>> content directly into your message (if not too long), or post it somewhere >>>> where we can look at it. >>>> >>>> >>>> >>>>> >>>>> On Wed, Jan 18, 2017 at 3:07 PM, André Warnier (tomcat) >>>>> wrote: >>>>>> >>>>>> On 18.01.2017 13:49, Fady Haikal wrote: >>>>>>> >>>>>>> >>>>>>> Guys, We are facing the below error (attached also) while trying to >>>>>>> shutdown tomcat server >>>>>>> >>>>>>> Java HotSpot(TM) 64-Bit Server VM warning: INFO: >>>>>>> os::commit_memory(0x00000000d5550000, 715849728, 0) failed; >>>>>>> error='Cannot allocate memory' (errno=12) >>>>>>> # >>>>>>> # There is insufficient memory for the Java Runtime Environment to >>>>>>> continue. >>>>>>> # Native memory allocation (mmap) failed to map 715849728 bytes for >>>>>>> committing reserved memory. >>>>>>> # An error report file with more information is saved as: >>>>>>> # /home/Jakob/Apps/Botlanegg/hs_err_pid40075.log >>>>>>> >>>>>>> Server Memory is 14 GB >>>>>>> Tomcat allocate 10 GB >>>>>>> Attached setenv.sh >>>>>>> >>>>>>> Please advise >>>>>>> >>>>>>> Regards, >>>>>>> Fady >>>>>>> >>>>>> >>>>>> And does the above-mentioned error report file contain more information, >>>>>> as >>>>>> it seems to promise ? >>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>>>> >>>>> >>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>> For additional commands, e-mail: users-help@tomcat.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org