You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/07/13 20:27:06 UTC

IMPORTANT: Issue with MRUMemmoryStore

We are getting NullPointerExceptions in MRUMemmoryStore when under load.  This
should not be.  The keys looked up are the XSP logicsheets, and this is the
Exception stacktrace available.

ERROR   99504   [cocoon  ] (Thread-40): Error in MRUMemoryStore!

java.lang.NullPointerException

	at org.apache.cocoon.components.store.MRUMemoryStore.checkSeriazable(MRUMemoryStore.java:349)

	at org.apache.cocoon.components.store.MRUMemoryStore.free(MRUMemoryStore.java:337)

	at org.apache.cocoon.components.store.MRUMemoryStore.hold(MRUMemoryStore.java:242)

	at org.apache.cocoon.components.store.MRUMemoryStore.store(MRUMemoryStore.java:227)

	at org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.configure(AbstractMarkupLanguage.java:132)

	at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:108)

	at org.apache.avalon.excalibur.component.DefaultComponentHandler.get(DefaultComponentHandler.java:92)

	at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:246)

	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:230)

	at org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:153)

	at org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:151)

	at org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)

	at org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)

	at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:279)

	at org.apache.cocoon.www.sitemap_xmap.wildcardMatchN18B(sitemap_xmap.java:1547)

	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:1051)

	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:997)

	at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)

	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:103)

	at org.apache.cocoon.Cocoon.process(Cocoon.java:354)

	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:488)

	at javax.servlet.http.HttpServlet.service(HttpServlet.java)

	at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:500)

	at org.apache.tomcat.core.Handler.service(Handler.java:223)

	at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:448)

	at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:788)

	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:701)

	at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:143)

	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:424)

	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:497)

	at java.lang.Thread.run(Thread.java:484)

AW: AW: IMPORTANT: Issue with MRUMemmoryStore + patch

Posted by Gerhard Froehlich <g-...@gmx.de>.
looks cool

thanx
gerhard

-----Ursprungliche Nachricht-----
Von: Davanum Srinivas [mailto:dims@yahoo.com]
Gesendet: Sonntag, 15. Juli 2001 22:48
An: cocoon-dev@xml.apache.org
Betreff: Re: AW: IMPORTANT: Issue with MRUMemmoryStore + patch


Gerhard,

Updated both C2.0 and C2.1. Please cross-check.

Thanks,
dims

--- Gerhard Froehlich <g-...@gmx.de> wrote:
> ++by the way I found a little bug. patch attached.
> by accident I attached 2 patches. here is the right
> one. I don't know why I have so much troubles with
> this patches :-(
> 
> Cheers
> gerhard
> 

> ATTACHMENT part 2 application/octet-stream name=patch.diff
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: AW: IMPORTANT: Issue with MRUMemmoryStore + patch

Posted by Davanum Srinivas <di...@yahoo.com>.
Gerhard,

Updated both C2.0 and C2.1. Please cross-check.

Thanks,
dims

--- Gerhard Froehlich <g-...@gmx.de> wrote:
> ++by the way I found a little bug. patch attached.
> by accident I attached 2 patches. here is the right
> one. I don't know why I have so much troubles with
> this patches :-(
> 
> Cheers
> gerhard
> 

> ATTACHMENT part 2 application/octet-stream name=patch.diff
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


AW: IMPORTANT: Issue with MRUMemmoryStore + patch

Posted by Gerhard Froehlich <g-...@gmx.de>.
++by the way I found a little bug. patch attached.
by accident I attached 2 patches. here is the right
one. I don't know why I have so much troubles with
this patches :-(

Cheers
gerhard

AW: IMPORTANT: Issue with MRUMemmoryStore + patch

Posted by Gerhard Froehlich <g-...@gmx.de>.
Hi Team,
some quick solution for the problem. I played around
with this cool JMeter Tool. When you set the writerthreadinterval
on >=1000ms then the out of memory exception disapears.

by the way I found a little bug. patch attached.

and under heavy load I cought this exception too:
--exception--
Could not access the Component for role:
org.apache.cocoon.components.pipeline.EventPipeline
java.lang.Exception: Could not create enough Components to service your
request.
	at org.apache.avalon.excalibur.pool.DefaultPool.get(DefaultPool.java:135)
	at
org.apache.avalon.excalibur.component.PoolableComponentHandler.get(PoolableC
omponentHandler.java:117)
	at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Excal
iburComponentManager.java:266)
	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2008)
	at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:103)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:354)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:496)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
	at org.apache.tomcat.core.Handler.service(Handler.java:287)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
	at java.lang.Thread.run(Thread.java:484)
--exception--

cheers
gerhard

++ Hi Team,
++ Ok, yesterday was not my day, too much confusion and strange
++ things happend. I think it was the friday 13th damnation :-).
++ Sorry for making needless noise here in that group!

++ I tested this morning my new MRUMemoryStore with JMeter:
++ - 10 Threads
++ - Delay 300ms
++ - URL: http://viper:89/cocoon2freece/welcome
++   and http://viper:89/cocoon2freece/welcome-svg

++ cocoon config:
++ - filesystem true
++ - writerthreadinterval 100ms

++ Following Problem:
++ The JVM runs out of memory.
++ When holding an object in the memory and the filesystem flag is
++ true, the object is temporary pushed on a stack. This stack
++ is processed asynchron by a backround thread. My idea behing was
++ to write the objects asychron to the filesystem to improve performance.
++ But the problem is that the objects are shortly stored double in memory
(1st
++ hashmap,
++ 2nd stack). By many concurrent request I think this causes the out of
++ memory Exception.

++ Writing synchron to filesystem its to slow I think.

++ But I will working on that problem. Meanwhile you can set the filesystem
++ flag
++ on false, when you make heavy load tests. Then the store proceed the old
++ way.

++ Cheers
++ Gerhard

AW: IMPORTANT: Issue with MRUMemmoryStore

Posted by Gerhard Froehlich <g-...@gmx.de>.
Hi Team,
Ok, yesterday was not my day, too much confusion and strange
things happend. I think it was the friday 13th damnation :-).
Sorry for making needless noise here in that group!

I tested this morning my new MRUMemoryStore with JMeter:
- 10 Threads
- Delay 300ms
- URL: http://viper:89/cocoon2freece/welcome
  and http://viper:89/cocoon2freece/welcome-svg

cocoon config:
- filesystem true
- writerthreadinterval 100ms

Following Problem:
The JVM runs out of memory.
When holding an object in the memory and the filesystem flag is
true, the object is temporary pushed on a stack. This stack
is processed asynchron by a backround thread. My idea behing was
to write the objects asychron to the filesystem to improve performance.
But the problem is that the objects are shortly stored double in memory (1st
hashmap,
2nd stack). By many concurrent request I think this causes the out of
memory Exception.

Writing synchron to filesystem its to slow I think.

But I will working on that problem. Meanwhile you can set the filesystem
flag
on false, when you make heavy load tests. Then the store proceed the old
way.

Cheers
Gerhard

++We are getting NullPointerExceptions in MRUMemmoryStore when under load.
This
++should not be.  The keys looked up are the XSP logicsheets, and this is
the
++Exception stacktrace available.

++ERROR   99504   [cocoon  ] (Thread-40): Error in MRUMemoryStore!

++java.lang.NullPointerException



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


AW: IMPORTANT: Issue with MRUMemmoryStore

Posted by Gerhard Froehlich <g-...@gmx.de>.
Hi,
2 things:
1. the problem is that I messed up the last patches.
please wait till dims checked in my latest patch. should
be this night.
2. In latest check out every request on a page
forces a new cocoon object. this causes a very
high system load on my machine too. I can't test
it rigth now. The logfile says, that the cocoon config
has changed, and because of that a new object is created.

I hope that my changes don't cause this effect.

Cheers
Gerhard

-----Ursprungliche Nachricht-----
Von: Berin Loritsch [mailto:bloritsch@apache.org]
Gesendet: Freitag, 13. Juli 2001 20:27
An: cocoon-dev@xml.apache.org
Betreff: IMPORTANT: Issue with MRUMemmoryStore


We are getting NullPointerExceptions in MRUMemmoryStore when under load.
This
should not be.  The keys looked up are the XSP logicsheets, and this is the
Exception stacktrace available.

ERROR   99504   [cocoon  ] (Thread-40): Error in MRUMemoryStore!

java.lang.NullPointerException

	at
org.apache.cocoon.components.store.MRUMemoryStore.checkSeriazable(MRUMemoryS
tore.java:349)

	at
org.apache.cocoon.components.store.MRUMemoryStore.free(MRUMemoryStore.java:3
37)

	at
org.apache.cocoon.components.store.MRUMemoryStore.hold(MRUMemoryStore.java:2
42)

	at
org.apache.cocoon.components.store.MRUMemoryStore.store(MRUMemoryStore.java:
227)

	at
org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.configur
e(AbstractMarkupLanguage.java:132)

	at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
faultComponentFactory.java:108)

	at
org.apache.avalon.excalibur.component.DefaultComponentHandler.get(DefaultCom
ponentHandler.java:92)

	at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(Exca
liburComponentSelector.java:246)

	at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:230)

	at
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator
.java:153)

	at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:151)

	at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:246)

	at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:108)

	at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:279)

	at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN18B(sitemap_xmap.java:1547)

	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:1051)

	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:997)

	at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)

	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:103)

	at org.apache.cocoon.Cocoon.process(Cocoon.java:354)

	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:488)

	at javax.servlet.http.HttpServlet.service(HttpServlet.java)

	at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:500)

	at org.apache.tomcat.core.Handler.service(Handler.java:223)

	at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:448)

	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:78
8)

	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:701)

	at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I
nterceptor.java:143)

	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:424)

	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:497)

	at java.lang.Thread.run(Thread.java:484)


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org