RE: java.lang.OutOfMemoryError: unable to create new native thread
We had out-of-memory problems with CFMX 6.1 udpater, and using metrics determined it wasn't growing the heap as it was supposed to. (We've stuck with the same settings on CFMX 7). I'd try starting the heap at the same size as the maximum, and also experiment with starting the Permanent Generation at 256, ... and get those metrics going. Here's a simple thing you can use in the interim: cfset runtime = CreateObject(java,java.lang.Runtime).getRuntime() !--- change amount from bytes to MB --- cfset freeMemory = runtime.freeMemory() / 1024 / 1024 cfset totalMemory = runtime.totalMemory() / 1024 / 1024 cfset maxMemory = runtime.maxMemory() / 1024 / 1024 cfoutput Free Allocated Memory: #Round(freeMemory)# MBbr Total Memory Allocated: #Round(totalMemory)# MBbr Max Memory Available to JVM: #Round(maxMemory)# MBbr /cfoutput br !--- From these numbers we can also determine the percent of free allocated memory available, and also the percent of avalaible memory allocated --- cfset percentFreeAllocated = Round((freeMemory / totalMemory) * 100) cfset percentAllocated = Round((totalMemory / maxMemory ) * 100) cfoutput % of Free Allocated Memory: #percentFreeAllocated#%br % of Available Memory Allocated: #percentAllocated#%br /cfoutput -- Original Message -- From: Russ [EMAIL PROTECTED] Reply-To: cf-talk@houseoffusion.com Date: Tue, 11 Apr 2006 12:16:02 -0400 I have already played with those settings, but it still crashed yesterday. Here are the settings I'm using: java.args=-server -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Xms256m -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=512m -XX:+UseParallelGC -XX:+AggressiveHeap You would think 512mb is enough for the heap? Am I giving it too much possibly? This server has 1gb of ram. Russ -Original Message- From: Oleg Gunkin [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 7:48 PM To: CF-Talk Subject: RE: java.lang.OutOfMemoryError: unable to create new native thread Coldfusion 7 needs more heap space than your JVM allows it to use. You need to increase maximum heap size. The following is for JSP, but solution is the same. http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17470 -- Oleg Gunkin Email: [EMAIL PROTECTED] Phone: (604) 666-9392 Emerging Technologies / Pacific Web Services Information Technology Services Public Works and Government Services Canada (Pacific) ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237786 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: java.lang.OutOfMemoryError: unable to create new native thread
I have already played with those settings, but it still crashed yesterday. Here are the settings I'm using: java.args=-server -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Xms256m -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=512m -XX:+UseParallelGC -XX:+AggressiveHeap You would think 512mb is enough for the heap? Am I giving it too much possibly? This server has 1gb of ram. Russ -Original Message- From: Oleg Gunkin [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 7:48 PM To: CF-Talk Subject: RE: java.lang.OutOfMemoryError: unable to create new native thread Coldfusion 7 needs more heap space than your JVM allows it to use. You need to increase maximum heap size. The following is for JSP, but solution is the same. http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17470 -- Oleg Gunkin Email: [EMAIL PROTECTED] Phone: (604) 666-9392 Emerging Technologies / Pacific Web Services Information Technology Services Public Works and Government Services Canada (Pacific) ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237428 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: java.lang.OutOfMemoryError: unable to create new native thread
have you turned on metrics logging? Maybe you need to up your max sim threads. your error trace has quite abit about JDBC in it. Are you limiting your DSN connections? DK On 4/11/06, Russ [EMAIL PROTECTED] wrote: I have already played with those settings, but it still crashed yesterday. Here are the settings I'm using: java.args=-server -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Xms256m -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=512m -XX:+UseParallelGC -XX:+AggressiveHeap You would think 512mb is enough for the heap? Am I giving it too much possibly? This server has 1gb of ram. Russ -Original Message- From: Oleg Gunkin [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 7:48 PM To: CF-Talk Subject: RE: java.lang.OutOfMemoryError: unable to create new native thread Coldfusion 7 needs more heap space than your JVM allows it to use. You need to increase maximum heap size. The following is for JSP, but solution is the same. http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17470 -- Oleg Gunkin Email: [EMAIL PROTECTED] Phone: (604) 666-9392 Emerging Technologies / Pacific Web Services Information Technology Services Public Works and Government Services Canada (Pacific) ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237443 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: java.lang.OutOfMemoryError: unable to create new native thread
Coldfusion 7 needs more mememory than your JVM allows it to use. You need to increase maximum heap size. The following is for JSP, but solution is the same. http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17470 -- Oleg Gunkin Email: [EMAIL PROTECTED] Phone: (604) 666-9392 Emerging Technologies / Pacific Web Services Information Technology Services Public Works and Government Services Canada (Pacific) -Original Message- From: Russ [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 16:14 To: CF-Talk Subject: java.lang.OutOfMemoryError: unable to create new native thread We've been having some server stability issues for a while since we've switched over to CF7. Now I notice that when the server crashes, we get the following in the error logs. Does anyone have any idea on what's causing it and how to fix it? I believe we are at the latest updater. Russ 04/10 19:00:14 error unable to create new native thread java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start(Native Method) at coldfusion.server.j2ee.sql.pool.ConnectionRunner.fetchConnection(ConnectionR unner.java:42) at coldfusion.server.j2ee.sql.pool.JDBCPool.create(JDBCPool.java:519) at coldfusion.server.j2ee.sql.pool.JDBCPool._checkOut(JDBCPool.java:444) at coldfusion.server.j2ee.sql.pool.JDBCPool.checkOut(JDBCPool.java:350) at coldfusion.server.j2ee.sql.pool.JDBCPool.requestConnection(JDBCPool.java:720 ) at coldfusion.server.j2ee.sql.pool.JDBCManager.requestConnection(JDBCManager.ja va:123) at coldfusion.server.j2ee.sql.JRunDataSource.getConnection(JRunDataSource.java: 138) at coldfusion.server.j2ee.sql.JRunDataSource.getConnection(JRunDataSource.java: 125) at coldfusion.sql.CFDataSource.getConnection(CFDataSource.java:37) at coldfusion.sql.DataSrcImpl.getCachedConnection(DataSrcImpl.java:149) at coldfusion.sql.DataSrcImpl.getConnection(DataSrcImpl.java:98) at coldfusion.runtime.JDBCHelper.Get(PersistenceFactory.java:94) at coldfusion.runtime.ClientScopeServiceImpl.GetClientScope(ClientScopeServiceI mpl.java:230) at coldfusion.runtime.AppHelper.setupClientScope(AppHelper.java:471) at coldfusion.tagext.lang.ApplicationTag.doStartTag(ApplicationTag.java:247) at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915) at cfApplication2ecfm1822256882.runPage(\\hms\cf\www\Application.cfm:7) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.CfincludeFilter.include(CfincludeFilter.java:33) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:156) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51) at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistence Filter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:11 5) at coldfusion.CfmServlet.service(CfmServlet.java:107) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at com.seefusion.Filter.doFilter(Filter.java:40) at com.seefusion.SeeFusion.doFilter(SeeFusion.java:934) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at RealIp.doFilter(RealIp.java:62) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java: 318) at
RE: java.lang.OutOfMemoryError: unable to create new native thread
Coldfusion 7 needs more heap space than your JVM allows it to use. You need to increase maximum heap size. The following is for JSP, but solution is the same. http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17470 -- Oleg Gunkin Email: [EMAIL PROTECTED] Phone: (604) 666-9392 Emerging Technologies / Pacific Web Services Information Technology Services Public Works and Government Services Canada (Pacific) ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237402 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: java.lang.OutOfMemoryError: unable to create new native thread
take a look at these blogs too http://www.robisen.com/index.cfm?mode=entryentry=39E0B0C6-55DC-F2B1-FBBDB70CEC963D6D http://www.bpurcell.org/blog/index.cfm?mode=entryentry=967 http://www.petefreitag.com/item/89.cfm I'd turn your metrics logs on right away, use these to help you adjust the above. http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19120 If you format the log outputs right, you can load up the data into Excel and play BA, generating purt graphs and all. At least one guy has put together a log viewer too http://www.macromedia.com/cfusion/exchange/index.cfm?view=sn131extid=1029407 DK On 4/10/06, Oleg Gunkin [EMAIL PROTECTED] wrote: Coldfusion 7 needs more heap space than your JVM allows it to use. You need to increase maximum heap size. The following is for JSP, but solution is the same. http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17470 -- Oleg Gunkin Email: [EMAIL PROTECTED] Phone: (604) 666-9392 Emerging Technologies / Pacific Web Services Information Technology Services Public Works and Government Services Canada (Pacific) ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237406 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54