Re: RE : Tomcat7 OutOFMemoryError
Pid wrote: On 06/03/2012 07:12, Rainer Frey wrote: On 05.03.2012, at 14:14, Philippe ROUXEL wrote: When I set JAVA_OPTS= -Xmx1024m -Xss75m That means: each thread get a stack of 75MB. One of the following applies: * the operating system has a limit on thread stack size * the per process memory limit is reached before all initial tomcat threads are started * the system runs out of total memory before all initial tomcat threads are started 75MB thread stack size seems quite insane, the default is around 1-2MB. Perhaps you meant to set -Xms (which sets the initial Java heap size)? 75MB of stack is needed by hibenate to save the data aka a graph. I haven't used hibernate personally, but I never heard anything like that. So please elaborate. Where did you get that information? Also what do you mean with graph? The graph of associated objects that are updated by one hibernate call, or is your data actually graph data? If so, how is that mapped? do you have any self-referential associations? Is it really stack that you are talking about? I'm also interested in the answers to these questions. Ok, to get back to the OP's original question/assumption : Assuming that -Xss75M tells the JVM to allocate 75 MB of memory for the stack of each new thread created by the JVM, and noting that for a typical Tomcat instance, a minimum of about 10 threads seem to be created (with an additional one for each request being processed), this setting of -Xss75M would mean that a minimum of 750 MB is being allocated for the threads' stack. Assuming on the other hand that this is a 32-bit system and JVM (the OP didn't really say, but was mentioning Windows XP), where the maximum addressable memory for a process is 4 GB (of which 1 GB more or less are used by the OS itself); and considering the setting of -Xmx1024M for the Heap; and considering that the rest of the JVM and Tomcat may use some 1024 MB by themselves (for other things than the Heap and thread stacks); Considering all this thus, it is not really so surprising that the OP would get an OOM error at some point. Noting on the other hand that the JVM stack should be mainly used to push and pop subroutine/function parameters as they are being called, and that a reasonable stack size seems to be around 512KB at most, this explains several comments here which seem to put in doubt the wisdom of allocation 75 MB for the stack of each Java thread. I am far from a specialist, but considering that Hibernate seems to be some kind of generic tool, it is a bit unlikely that using it would require to set the stack size to an amount that is at least 150 times the JVM default, no ? All this seems to point - as usual - to some application problem, with as Chris pointed out some runaway recursive function call or similar. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Issues with the tomcat connector (On W2k8 + IIS7.5)
On 03/06/2012 06:35 AM, Alex Samad - Yieldbroker wrote: Hi ... a very long post :) In general I agree that newest IIS's needs some tune up. You are very welcome to provide patches. Does somebody have a tar ball of a tree what I can just point to and compile :) (or maybe some instruction on how to get it to build from the svn tree in VS2010) That's easy. Open VSxxx command prompt for target CPU and cd to native/iis then just nmake -f Makefile.x86 or nmake -f Makefile.amd64 for 64-bit I don't believe in GUI :) Regards -- ^TM - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Proxypass Question
Perfectly Normal if a http request comes in yoiu want to 1)log the request ( writing the HTTP Env Vars) 2)forward to https if a https request comes in you want to 1)log (writing the HTTP Env vars) 2)authenticate does your client that uses Tomcat have at least *read access* to /mnt/html/example/www.example.com.key Viel Gluck! Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: truck...@woodbridgedata.com To: users@tomcat.apache.org Subject: Proxypass Question Date: Mon, 5 Mar 2012 23:18:52 -0500 Greetings, I'm not sure whether this is a tomcat6 issue or an apache issue, but I thought maybe I would start here if no one minds. We have a domain name and we have apache answering the door on both https(443) and http(80). What we'd like to do is proxypass port 443 to tomcat6, and have port 80 serve html files normally on that domain name (i.e. different content) So, we defined such in /etc/httpd/conf.d/virtuals.conf like so: NameVirtualHost *:443 VirtualHost *:443 ServerName www.example.com:443 SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /mnt/html/example/example.com.crt SSLCertificateKeyFile /mnt/html/example/www.example.com.key ProxyPass / ajp://localhost:8009/ /VirtualHost NameVirtualHost *:80 VirtualHost *:80 ServerName www.example.com:80 #ProxyPass / ajp://localhost:8009/ DocumentRoot/mnt/html/example /VirtualHost With the above, nothing works and in the /var/log/error_log file we see an entry for file does not exist /mnt/html/example/, and we get that entry regardless whether we hit ports 443 or port 80 - which tells us nothing is proxying when set this way. If we change the latter part of the configuration file to this: NameVirtualHost *:80 VirtualHost *:80 ServerName www.example.com:80 ProxyPass / ajp://localhost:8009/ #DocumentRoot/mnt/html/example /VirtualHost Then https: does in fact proxy up to tomcat6, the application loads, and all is well. However, it does the very same thing for port 80 as the proxypass statement is there also. Proxypass seems to only work if both ports are proxied, and not work if either port is not proxied. My question is this - is that the normal/expected behavior of proxypass, or should we keep digging elsewhere? Thank you very much! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fwd: JMX MBean for active sessions
Hi all, can anyone please tell me where can I find any information about changes between Tomcat 6 and 7 regarding MBean names? Our operations team is using Bridgeways Tomcat pack for SCOM and since we switched to Tomcat 7 the active session data is missing from the monitors - everything else is there except this one. Thanks in advance for any help, best regards Attila
Re: Issues with the tomcat connector (On W2k8 + IIS7.5)
On 03/06/2012 06:35 AM, Alex Samad - Yieldbroker wrote: Hi Under load, IIS will first start 1 process and then if enough request another and another depending on load. So what I see is 4 process starting at about the same time and the shared memory is getting corrupted and from there it turns to poo. Try with the latest trunk. I added process mutex instead critical section for guarding init_jk. This should solve concurrent launches of multiple processes for the same host by serializing access to initialization. Regards -- ^TM - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Retrieve context path in lifecycle listener
Hi folks, I'd like to retrieve the context path from the a startup event in a context lifecycle listener. My usecase is register that contextpath in the initial context and access its value through Logback. Unfortunately, LifecycleEvent does not seem to contain this data. Is there a way? Thanks, Mike -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Retrieve context path in lifecycle listener
2012/3/6 sg...@gmx.net: Hi folks, I'd like to retrieve the context path from the a startup event in a context lifecycle listener. My usecase is register that contextpath in the initial context and access its value through Logback. Unfortunately, LifecycleEvent does not seem to contain this data. 1. Exact Tomcat version =? 2. LifecycleEvent extends EventObject, EventObject.getSource() ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JDBC Pool - Error handling during connection creation
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Amit, On 3/6/12 4:46 AM, amit shah wrote: Hello, I am using the tomcat jdbc pool independently in my application and frequently I faced a NullPointerException with the below stack trace null at org.apache.tomcat.jdbc.pool.ConnectionPool.setupConnection(ConnectionPool.java:276) What exact version of Tomcat and/or the Tomcat pool are you using? The root cause of the exception is suppressed by the jdbc pool code by returning null from the validate() method. My point of raising this up is that it becomes hard to troubleshoot such errors in production when the actual exception is suppressed. The actual exception occurs while executing the initSQL query or the validation query. Shouldn't an exception be thrown right at the point where the error occurred? I don't see any place in setupConnection where an exception is swallowed, do you? http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?view=markup - -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/ iEYEARECAAYFAk9WIS4ACgkQ9CaO5/Lv0PAyFACfe/0jqpUzA1krhuxTFb/4sxJQ 46oAoJXV48dwC6IFy4f1dozhOc45Wo3R =ZHQa -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fwd: JMX MBean for active sessions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Attila, On 3/6/12 7:13 AM, Attila Balogh wrote: can anyone please tell me where can I find any information about changes between Tomcat 6 and 7 regarding MBean names? I dunno about /changes/ specifically (I'm not going to try to guess your version and then do a diff against the code), but this is what you're looking for in Tomcat 7: objectName: Catalina:type=Manager,context=/mywebapp,host=localhost attribute: activeSessions That value is an 'int'. Our operations team is using Bridgeways Tomcat pack for SCOM and since we switched to Tomcat 7 the active session data is missing from the monitors - everything else is there except this one. Have you contacted Bridgeways? - -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/ iEYEARECAAYFAk9WIqMACgkQ9CaO5/Lv0PAwlgCgiHyHdAGQJQaDaFOyGydkn90O xRAAn3Quv7V77tjDxy/haiNCLu3e6niQ =rSLE -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fwd: JMX MBean for active sessions
2012/3/6 Christopher Schultz ch...@christopherschultz.net: On 3/6/12 7:13 AM, Attila Balogh wrote: can anyone please tell me where can I find any information about changes between Tomcat 6 and 7 regarding MBean names? I dunno about /changes/ specifically (I'm not going to try to guess your version and then do a diff against the code), but this is what you're looking for in Tomcat 7: objectName: Catalina:type=Manager,context=/mywebapp,host=localhost attribute: activeSessions where Catalina is name of an Engine and is configurable. E.g. for embedded tomcat it is Tomcat. That value is an 'int'. Our operations team is using Bridgeways Tomcat pack for SCOM and since we switched to Tomcat 7 the active session data is missing from the monitors - everything else is there except this one. Have you contacted Bridgeways? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Retrieve context path in lifecycle listener
Hi Konstantin, 2012/3/6 sg...@gmx.net: Hi folks, I'd like to retrieve the context path from the a startup event in a context lifecycle listener. My usecase is register that contextpath in the initial context and access its value through Logback. Unfortunately, LifecycleEvent does not seem to contain this data. 1. Exact Tomcat version =? I am on 6.0.35 2. LifecycleEvent extends EventObject, EventObject.getSource() ? This will return /contextPath which I can store in java:comp/env/someName? Thanks, Mike -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Proxypass Question
As per list member Pid, I am starting a new thread rather than lobotomizing an existing one. Pid, you're right, my apologies, I was being lazy. Using apache virtual hosting, I am trying to forward port 443 to tomcat, yet have port 80 serve normal local content in the traditional fashion. The reason for this is by business policy the application running on tomcat must be accessed via https using ssl, and the user instruction manual for that application resides on port 80, and is just a bunch of html files. Meaning: (443) https://www.example.org - proxypass / ajp -- tomcat6 (80) http://www.example.org - serves html files from /mnt/html/example To achieve this, we created the following definitions within /etc/httpd/conf.d/virtuals.conf: NameVirtualHost *:443 VirtualHost *:443 ServerName www.example.com:443 SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /mnt/html/example/example.com.crt SSLCertificateKeyFile /mnt/html/example/www.example.com.key ProxyPass / ajp://localhost:8009/ /VirtualHost NameVirtualHost *:80 VirtualHost *:80 ServerName www.example.com:80 #ProxyPass / ajp://localhost:8009/ DocumentRoot/mnt/html/example /VirtualHost Unfortunately, the above doesn't work. It appears we have to change the port 80 definition to the below to allow port 443 to proxy through ajp: VirtualHost *:80 ServerName www.example.com:80 ProxyPass / ajp://localhost:8009/ #DocumentRoot/mnt/html/example /VirtualHost Does proxypass ajp REQUIRE that both ports be forwarded? Or can we have port 443 proxy up to tomcat, and port 80 serve ordinary, boring, html files? Thank you in advance - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem with JMXProxy after upgrading from 6.0.29 to 7.0.26
Hi, We have been using the following two JMXProxy URLs for monitoring without issue in 6.0.29. http://localhost:8080/manager/jmxproxy/?qry=*:type=Executor,name=tomcatThreadPool OK - Number of results: 1 Name: Catalina:type=Executor,name=tomcatThreadPool modelerType: org.apache.tomcat.util.modeler.BaseModelMBean threadPriority: 5 queueSize: 0 corePoolSize: 4 maxIdleTime: 6 threadRenewalDelay: 1000 minSpareThreads: 4 activeCount: 1 maxThreads: 150 completedTaskCount: 17 maxQueueSize: 2147483647 largestPoolSize: 5 stateName: STARTED name: tomcatThreadPool poolSize: 3 namePrefix: catalina-exec- http://localhost:8080/manager/jmxproxy/?qry=bean:name=eventingDataSource OK - Number of results: 1 Name: bean:name=eventingDataSource modelerType: org.apache.tomcat.jdbc.pool.DataSource MaxIdle: 100 JdbcInterceptors: org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer DefaultTransactionIsolation: -1 ValidationQuery: SELECT 1 FROM dual TestOnConnect: false Password: Password not available as DataSource/JMX operation. AbandonWhenPercentageFull: 0 TestOnReturn: false Username: NumActive: 0 MinIdle: 10 PoolSize: 4 ValidationInterval: 180 Connection: ProxyConnection[PooledConnection[oracle.jdbc.driver.T4CConnection@17f8b39]] NumIdle: 2 AccessToUnderlyingConnectionAllowed: true Url: jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1580))(CONNECT_DATA =(SERVER = DEDICATED)( SERVICE_NAME = anywhere.com )(INSTANCE_NAME = xxx)(SID = xxx))) Size: 4 Active: 2 AlternateUsernameAllowed: false TestOnBorrow: true LoginTimeout: 6 MaxActive: 100 MaxAge: 0 SuspectTimeout: 0 Pool: org.apache.tomcat.jdbc.pool.ConnectionPool@9283bf NumTestsPerEvictionRun: 0 Name: Tomcat Connection Pool[1-6300663] MaxWait: 6000 PoolProperties: ConnectionPool[defaultAutoCommit=null; defaultReadOnly=null; defaultTransactionIsolation=-1; defaultCatalog=null; driverClassName=oracle.jdbc.driver.OracleDriver; maxActive=100; maxIdle=100; minIdle=10; initialSize=10; maxWait=6000; testOnBorrow=true; testOnReturn=false; timeBetweenEvictionRunsMillis=3; numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=3; testWhileIdle=false; testOnConnect=false; password=x; url=jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1580))(CONNECT_DATA =(SERVER = DEDICATED)( SERVICE_NAME = p201.nbcuni.ge.com )(INSTANCE_NAME = xxx)(SID = xxx))); username=NBCAFS_GUSER; validationQuery=SELECT 1 FROM dual; validationInterval=180; accessToUnderlyingConnectionAllowed=true; removeAbandoned=true; removeAbandonedTimeout=60; logAbandoned=true; connectionProperties=null; initSQL=null; jdbcInterceptors=org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer; jmxEnabled=true; fairQueue=false; useEquals=false; abandonWhenPercentageFull=0; maxAge=0; useLock=false; dataSource=null; dataSourceJNDI=null; alternateUsernameAllowed=false; PoolName: Tomcat Connection Pool[1-6300663] WaitCount: 0 JmxEnabled: true TestWhileIdle: false UseEquals: false UseLock: false DriverClassName: oracle.jdbc.driver.OracleDriver RemoveAbandonedTimeout: 60 DbProperties: {user=, password=} Idle: 2 LogAbandoned: true FairQueue: false PoolSweeperEnabled: true ConnectionAsync: org.apache.tomcat.jdbc.pool.ConnectionPool$ConnectionFuture@e9c2d3 JdbcInterceptorsAsArray: Array[org.apache.tomcat.jdbc.pool.PoolProperties$InterceptorDefinition] of length 2 org.apache.tomcat.jdbc.pool.PoolProperties$InterceptorDefinition@125f027 org.apache.tomcat.jdbc.pool.PoolProperties$InterceptorDefinition@1b99628 RemoveAbandoned: true TimeBetweenEvictionRunsMillis: 3 MinEvictableIdleTimeMillis: 3 InitialSize: 10 After upgrading to 7.0.26 the JMXProxy URLs still return the correct data however I am now seeing the following exceptions in the Tomcat logs. Mar 6, 2012 9:17:40 AM org.apache.catalina.mbeans.MBeanDumper dumpBeans SEVERE: Error getting attribute Catalina:type=Executor,name=tomcatThreadPool prestartminSpareThreads javax.management.ReflectionException: Cannot find getter method getPrestartminSpareThreads at org.apache.tomcat.util.modeler.ManagedBean.getGetter(ManagedBean.java:517) at org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:181) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638) at org.apache.catalina.mbeans.MBeanDumper.dumpBeans(MBeanDumper.java:82) at org.apache.catalina.manager.JMXProxyServlet.listBeans(JMXProxyServlet.java:172) at org.apache.catalina.manager.JMXProxyServlet.doGet(JMXProxyServlet.java:121) at
Re: Proxypass Question
Truckman wrote: As per list member Pid, I am starting a new thread rather than lobotomizing an existing one. Pid, you're right, my apologies, I was being lazy. Using apache virtual hosting, I am trying to forward port 443 to tomcat, yet have port 80 serve normal local content in the traditional fashion. The reason for this is by business policy the application running on tomcat must be accessed via https using ssl, and the user instruction manual for that application resides on port 80, and is just a bunch of html files. Meaning: (443) https://www.example.org - proxypass / ajp -- tomcat6 (80) http://www.example.org - serves html files from /mnt/html/example To achieve this, we created the following definitions within /etc/httpd/conf.d/virtuals.conf: NameVirtualHost *:443 VirtualHost *:443 ServerName www.example.com:443 SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /mnt/html/example/example.com.crt SSLCertificateKeyFile /mnt/html/example/www.example.com.key ProxyPass / ajp://localhost:8009/ /VirtualHost NameVirtualHost *:80 VirtualHost *:80 ServerName www.example.com:80 #ProxyPass / ajp://localhost:8009/ DocumentRoot/mnt/html/example /VirtualHost Unfortunately, the above doesn't work. It appears we have to change the port 80 definition to the below to allow port 443 to proxy through ajp: VirtualHost *:80 ServerName www.example.com:80 ProxyPass / ajp://localhost:8009/ #DocumentRoot/mnt/html/example /VirtualHost Does proxypass ajp REQUIRE that both ports be forwarded? Or can we have port 443 proxy up to tomcat, and port 80 serve ordinary, boring, html files? What if you simply do /not/ specify the port number in your ServerName directives above ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RE : Tomcat7 OutOFMemoryError
On 6 Mar 2012, at 08:16, André Warnier a...@ice-sa.com wrote: Pid wrote: On 06/03/2012 07:12, Rainer Frey wrote: On 05.03.2012, at 14:14, Philippe ROUXEL wrote: When I set JAVA_OPTS= -Xmx1024m -Xss75m That means: each thread get a stack of 75MB. One of the following applies: * the operating system has a limit on thread stack size * the per process memory limit is reached before all initial tomcat threads are started * the system runs out of total memory before all initial tomcat threads are started 75MB thread stack size seems quite insane, the default is around 1-2MB. Perhaps you meant to set -Xms (which sets the initial Java heap size)? 75MB of stack is needed by hibenate to save the data aka a graph. I haven't used hibernate personally, but I never heard anything like that. So please elaborate. Where did you get that information? Also what do you mean with graph? The graph of associated objects that are updated by one hibernate call, or is your data actually graph data? If so, how is that mapped? do you have any self-referential associations? Is it really stack that you are talking about? I'm also interested in the answers to these questions. Ok, to get back to the OP's original question/assumption : Assuming that -Xss75M tells the JVM to allocate 75 MB of memory for the stack of each new thread created by the JVM, and noting that for a typical Tomcat instance, a minimum of about 10 threads seem to be created (with an additional one for each request being processed), this setting of -Xss75M would mean that a minimum of 750 MB is being allocated for the threads' stack. Assuming on the other hand that this is a 32-bit system and JVM (the OP didn't really say, but was mentioning Windows XP), where the maximum addressable memory for a process is 4 GB (of which 1 GB more or less are used by the OS itself); and considering the setting of -Xmx1024M for the Heap; and considering that the rest of the JVM and Tomcat may use some 1024 MB by themselves (for other things than the Heap and thread stacks); Considering all this thus, it is not really so surprising that the OP would get an OOM error at some point. Noting on the other hand that the JVM stack should be mainly used to push and pop subroutine/function parameters as they are being called, and that a reasonable stack size seems to be around 512KB at most, this explains several comments here which seem to put in doubt the wisdom of allocation 75 MB for the stack of each Java thread. 75Mb is far too much for the thread stack size in a normal application. I am not certain that it is necessarily fully allocated, just to confuse matters further. I vaguely remember another discussion about this, but can't find it in the archives. p I am far from a specialist, but considering that Hibernate seems to be some kind of generic tool, it is a bit unlikely that using it would require to set the stack size to an amount that is at least 150 times the JVM default, no ? All this seems to point - as usual - to some application problem, with as Chris pointed out some runaway recursive function call or similar. - 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: Problem with JMXProxy after upgrading from 6.0.29 to 7.0.26
This appears to be another variant of the following bug that was supposed to be fixed in 7.0.26. https://issues.apache.org/bugzilla/show_bug.cgi?id=52591 -- View this message in context: http://tomcat.10.n6.nabble.com/Problem-with-JMXProxy-after-upgrading-from-6-0-29-to-7-0-26-tp4551753p4551993.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat6w.exe -- 32bit and 64bit versions identical?
I am in an environment where I deploy tomcat via a script. Rather than keep two entire copies of Tomcat for 32- and 64-bit systems I have the complete 32-bit download plus the 64-bit tomcat6*.exe files. I'm upgrading from 6.0.20 to 6.0.35 and my usual procedure is to diff the 32- and 64-bit versions, which in the past has found only those differences (and tcnative-1.dll). This time, when diffing apache-tomcat-6.0.35-windows-x64 with apache-tomcat-6.0.35-windows-x86, I get only tomcat6.exe as different. The two versions of tomcat6w.exe are identical. Is this correct?
Re: tomcat6w.exe -- 32bit and 64bit versions identical?
Jim Garrison jim.garri...@troux.com wrote: I am in an environment where I deploy tomcat via a script. Rather than keep two entire copies of Tomcat for 32- and 64-bit systems I have the complete 32-bit download plus the 64-bit tomcat6*.exe files. I'm upgrading from 6.0.20 to 6.0.35 and my usual procedure is to diff the 32- and 64-bit versions, which in the past has found only those differences (and tcnative-1.dll). This time, when diffing apache-tomcat-6.0.35-windows-x64 with apache-tomcat-6.0.35-windows-x86, I get only tomcat6.exe as different. The two versions of tomcat6w.exe are identical. Is this correct? Yes. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat6w.exe -- 32bit and 64bit versions identical?
From: Jim Garrison [mailto:jim.garri...@troux.com] Subject: tomcat6w.exe -- 32bit and 64bit versions identical? The two versions of tomcat6w.exe are identical. Is this correct? That is correct. The tomcat6w.exe program does not access the JVM, so it need not match the JVM's execution mode. - 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: Issues with the tomcat connector (On W2k8 + IIS7.5)
-Original Message- From: Mladen Turk [mailto:mt...@apache.org] Sent: Tuesday, 6 March 2012 11:52 PM To: users@tomcat.apache.org Subject: Re: Issues with the tomcat connector (On W2k8 + IIS7.5) On 03/06/2012 06:35 AM, Alex Samad - Yieldbroker wrote: Hi Under load, IIS will first start 1 process and then if enough request another and another depending on load. So what I see is 4 process starting at about the same time and the shared memory is getting corrupted and from there it turns to poo. Try with the latest trunk. I added process mutex instead critical section for guarding init_jk. This should solve concurrent launches of multiple processes for the same host by serializing access to initialization. Great thanks Regards -- ^TM -Original Message- From: Mladen Turk [mailto:mt...@apache.org] Sent: Tuesday, 6 March 2012 9:39 PM To: users@tomcat.apache.org Subject: Re: Issues with the tomcat connector (On W2k8 + IIS7.5) On 03/06/2012 06:35 AM, Alex Samad - Yieldbroker wrote: Hi ... a very long post :) Sorry wanted to make sure I had it all in there. Been working on it for a bit In general I agree that newest IIS's needs some tune up. You are very welcome to provide patches. Does somebody have a tar ball of a tree what I can just point to and compile :) (or maybe some instruction on how to get it to build from the svn tree in VS2010) That's easy. Open VSxxx command prompt for target CPU and cd to native/iis then just nmake -f Makefile.x86 or nmake -f Makefile.amd64 for 64-bit Cool will try that ! I don't believe in GUI :) Can believe how much of a pain VS is compared to eclipse ... but I can work a cli as well ! Regards -- ^TM - 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: Issues with the tomcat connector (On W2k8 + IIS7.5)
-Original Message- From: Mladen Turk [mailto:mt...@apache.org] Sent: Tuesday, 6 March 2012 9:39 PM To: users@tomcat.apache.org Subject: Re: Issues with the tomcat connector (On W2k8 + IIS7.5) [snip] That's easy. Open VSxxx command prompt for target CPU and cd to native/iis then just nmake -f Makefile.x86 or nmake -f Makefile.amd64 for 64-bit Tried it, downloaded the latest head from trunk, started my amd64 VS windows, made my way over to the project directory nmake -f Makefile.amd64 [bunch of stuff] cl.exe @C:\Users\ALEX~1.SAM\AppData\Local\Temp\nm1CA4.tmp jk_isapi_plugin.c link.exe @C:\Users\ALEX~1.SAM\AppData\Local\Temp\nm205C.tmp Creating library .\Release_amd64\isapi_redirect.lib and object .\Release_amd64\isapi_redirect.exp jk_isapi_plugin.obj : error LNK2001: unresolved external symbol pcre_free jk_isapi_plugin.obj : error LNK2019: unresolved external symbol pcre_info referenced in function ap_regcomp jk_isapi_plugin.obj : error LNK2019: unresolved external symbol pcre_compile referenced in function ap_regcomp jk_isapi_plugin.obj : error LNK2019: unresolved external symbol pcre_exec referenced in function ap_regexec .\Release_amd64\isapi_redirect.dll : fatal error LNK1120: 4 unresolved externals NMAKE : fatal error U1077: 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\link.exe' : return code '0x460' Stop. I gather something is missing from the pcre lib Run again so I gather the error message completely C:\Users\alex.samad\Documents\SVN\Tomcat-Connector\native\iisnmake -f Makefile.amd64 Microsoft (R) Program Maintenance Utility Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. cd .\pcre C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\nmake.exe / /F .\pcre.amd64 Microsoft (R) Program Maintenance Utility Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. cd .. link.exe @C:\Users\ALEX~1.SAM\AppData\Local\Temp\nm5EA3.tmp Creating library .\Release_amd64\isapi_redirect.lib and object .\Release_amd64\isapi_redirect.exp jk_isapi_plugin.obj : error LNK2001: unresolved external symbol pcre_free jk_isapi_plugin.obj : error LNK2019: unresolved external symbol pcre_info referenced in function ap_regcomp jk_isapi_plugin.obj : error LNK2019: unresolved external symbol pcre_compile referenced in function ap_regcomp jk_isapi_plugin.obj : error LNK2019: unresolved external symbol pcre_exec referenced in function ap_regexec .\Release_amd64\isapi_redirect.dll : fatal error LNK1120: 4 unresolved externals NMAKE : fatal error U1077: 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\link.exe' : return code '0x460' Stop. I am guess some object is not being compiled or added to the list of files for the lib.. I don't believe in GUI :) Regards -- ^TM - 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: Issues with the tomcat connector (On W2k8 + IIS7.5)
-Original Message- From: Alex Samad - Yieldbroker [mailto:alex.sa...@yieldbroker.com] Sent: Wednesday, 7 March 2012 9:30 AM To: Tomcat Users List Subject: RE: Issues with the tomcat connector (On W2k8 + IIS7.5) [snip] .\Release_amd64\isapi_redirect.exp jk_isapi_plugin.obj : error LNK2001: unresolved external symbol pcre_free jk_isapi_plugin.obj : error LNK2019: unresolved external symbol pcre_info referenced in function ap_regcomp jk_isapi_plugin.obj : error LNK2019: unresolved external symbol pcre_compile referenced in function ap_regcomp jk_isapi_plugin.obj : error LNK2019: unresolved external symbol pcre_exec referenced in function ap_regexec .\Release_amd64\isapi_redirect.dll : fatal error LNK1120: 4 unresolved externals NMAKE : fatal error U1077: 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\link.exe' : return code '0x460' Stop. I tried the x86 version and it compiled okay ! I am guess some object is not being compiled or added to the list of files for the lib.. [snip] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Issues with the tomcat connector (On W2k8 + IIS7.5)
Hi -Original Message- From: Alex Samad - Yieldbroker [mailto:alex.sa...@yieldbroker.com] Sent: Wednesday, 7 March 2012 9:35 AM To: Tomcat Users List Subject: RE: Issues with the tomcat connector (On W2k8 + IIS7.5) [snip] I tried the x86 version and it compiled okay ! Sorry for the extra email. I tried a build with x86 version it built the dftables exe, then did a nmake -f Makefile.amd64 it completed but gave me errors, they looked like I had mixed 32 and 64 bit code together.. so did a nmake -f Makefile.x86 clean nmake -f Makefile.amd64 clean I patched Mmakefile.amd64 it was different to the x86 one then ran nmake -f Makefile.amd64 again, built no errors or warnings Thanks Alex Patch... Index: Makefile.amd64 === --- Makefile.amd64 (revision 1297756) +++ Makefile.amd64 (working copy) @@ -293,10 +293,10 @@ pcre_amd64 : cd .\pcre - $(MAKE) /$(MAKEFLAGS) /F .\pcre.amd64 + $(MAKE) /$(MAKEFLAGS) /F .\pcre.amd64 CFG=pcre.amd64 cd .. pcre_amd64CLEAN : cd .\pcre - $(MAKE) /$(MAKEFLAGS) /F .\pcre.amd64 RECURSE=1 CLEAN + $(MAKE) /$(MAKEFLAGS) /F .\pcre.amd64 CFG=pcre.amd64 RECURSE=1 CLEAN cd .. [snip] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Trying to compile the tomcat connector
Hi I am trying to compile the latest version from svn. (I have started a new thread at it a different topic) I have downloaded the latest trunk version, made a patch to Makefile.amd64 Index: Makefile.amd64 === --- Makefile.amd64 (revision 1297756) +++ Makefile.amd64 (working copy) @@ -293,10 +293,10 @@ pcre_amd64 : cd .\pcre - $(MAKE) /$(MAKEFLAGS) /F .\pcre.amd64 + $(MAKE) /$(MAKEFLAGS) /F .\pcre.amd64 CFG=pcre.amd64 cd .. pcre_amd64CLEAN : cd .\pcre - $(MAKE) /$(MAKEFLAGS) /F .\pcre.amd64 RECURSE=1 CLEAN + $(MAKE) /$(MAKEFLAGS) /F .\pcre.amd64 CFG=pcre.amd64 RECURSE=1 + CLEAN cd .. That seems to make it build. But when I try to load it into IIS I get From Failed Request tracking on IIS ErrorDescription Calling LoadLibraryEx on ISAPI filter C:\YB\Shared\dev.yieldbroker.com\ajpconfig\isapi_redirect.dll failed I tried to pull down 1.2.32 and compile it but more issues with that ! So I am not sure if its my change to the makefile or the changes that have been made to the init_jk code ! Alex - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RE : Tomcat7 OutOFMemoryError
On 06.03.2012 18:21, Pid * wrote: On 6 Mar 2012, at 08:16, André Warniera...@ice-sa.com wrote: Pid wrote: On 06/03/2012 07:12, Rainer Frey wrote: On 05.03.2012, at 14:14, Philippe ROUXEL wrote: When I set JAVA_OPTS= -Xmx1024m -Xss75m That means: each thread get a stack of 75MB. One of the following applies: * the operating system has a limit on thread stack size * the per process memory limit is reached before all initial tomcat threads are started * the system runs out of total memory before all initial tomcat threads are started 75MB thread stack size seems quite insane, the default is around 1-2MB. Perhaps you meant to set -Xms (which sets the initial Java heap size)? 75MB of stack is needed by hibenate to save the data aka a graph. I haven't used hibernate personally, but I never heard anything like that. So please elaborate. Where did you get that information? Also what do you mean with graph? The graph of associated objects that are updated by one hibernate call, or is your data actually graph data? If so, how is that mapped? do you have any self-referential associations? Is it really stack that you are talking about? I'm also interested in the answers to these questions. Ok, to get back to the OP's original question/assumption : Assuming that -Xss75M tells the JVM to allocate 75 MB of memory for the stack of each new thread created by the JVM, and noting that for a typical Tomcat instance, a minimum of about 10 threads seem to be created (with an additional one for each request being processed), this setting of -Xss75M would mean that a minimum of 750 MB is being allocated for the threads' stack. Assuming on the other hand that this is a 32-bit system and JVM (the OP didn't really say, but was mentioning Windows XP), where the maximum addressable memory for a process is 4 GB (of which 1 GB more or less are used by the OS itself); and considering the setting of -Xmx1024M for the Heap; and considering that the rest of the JVM and Tomcat may use some 1024 MB by themselves (for other things than the Heap and thread stacks); Considering all this thus, it is not really so surprising that the OP would get an OOM error at some point. Noting on the other hand that the JVM stack should be mainly used to push and pop subroutine/function parameters as they are being called, and that a reasonable stack size seems to be around 512KB at most, this explains several comments here which seem to put in doubt the wisdom of allocation 75 MB for the stack of each Java thread. 75Mb is far too much for the thread stack size in a normal application. I am not certain that it is necessarily fully allocated, just to confuse matters further. I vaguely remember another discussion about this, but can't find it in the archives. By the way some slightly related anecdote: I once had to diagnose a strange situation which at the end was explained by a user setting ThreadStackSize to 2M. Note that the docs say ThreadStackSize is in K (Kilo Bytes) and the code in fact does multiply the given value with 1000 (or 1024). So if you set ThreadStackSize to 2M verbatim you end up configuring a stack size of 2GB :) I forgot whether Xss also is in K or is in Bytes. Interpreting ThreadStack Size in K and multiplying up all other units given in the value IMHO is one of the most strange decisions done when designing JVM flags. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JDBC Pool - Error handling during connection creation
Comments below. Thanks, Amit. On Tue, Mar 6, 2012 at 8:07 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Amit, On 3/6/12 4:46 AM, amit shah wrote: Hello, I am using the tomcat jdbc pool independently in my application and frequently I faced a NullPointerException with the below stack trace null at org.apache.tomcat.jdbc.pool.ConnectionPool.setupConnection(ConnectionPool.java:276) What exact version of Tomcat and/or the Tomcat pool are you using? I am using tomcat-jdbc.jar and tomcat-juli.jar from version 7.0.26. The root cause of the exception is suppressed by the jdbc pool code by returning null from the validate() method. My point of raising this up is that it becomes hard to troubleshoot such errors in production when the actual exception is suppressed. The actual exception occurs while executing the initSQL query or the validation query. Shouldn't an exception be thrown right at the point where the error occurred? I don't see any place in setupConnection where an exception is swallowed, do you? http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?view=markup Have a look at the public boolean validate(int validateAction,String sql) method in PooledConnection class line no - 445. The validate method ignores any exception which is thrown while validating the connection or executing the initSQL query. The createConnection() method in ConnectionPool class which calls the validate() method returns null in such a case and hence it leads to a null pointer exception in setupConnection method. Ignoring the exception in the validate() method may sound appropriate (not sure for what reason though) but my point is that it makes troubleshooting the issue a lot harder. - -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/ iEYEARECAAYFAk9WIS4ACgkQ9CaO5/Lv0PAyFACfe/0jqpUzA1krhuxTFb/4sxJQ 46oAoJXV48dwC6IFy4f1dozhOc45Wo3R =ZHQa -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Tomcat JDBC Pool] Close pooled connections via JMX
There's nothing like chasing your tail for a few days on a mailing list. - -chris ok, ok ...it was my fault ... sorry :-/ Regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org