Hi Dan,
well the first entry on your link allready does what you need :)
Instead of
wrapper.on_exit.default=SHUTDOWN
do a
wrapper.on_exit.default=RESTART
this way your karaf will always restart through the servicewrapper.
No back to your PermGen leak issue.
Could you give me a hint of what you actually are doing.
If I did understand correctly you use the features service to deploy a
bunch of bundles.
Now how often do you actually re-deploy this feature set?
How many classes are contained in your bundles?
regards, Achim
Am 15.12.2011 21:23, schrieb Dan Tran:
We should be able to configure wrapper to restart karaf if karaf exits
with an expected code. see
http://wrapper.tanukisoftware.com/doc/english/prop-on-exit-n.html
The question here is how can we do that a karaf's bundle? Can we call
shutdown with an exit code?
Thanks
-Dan
On Thu, Dec 15, 2011 at 9:21 AM, Jean-Baptiste Onofré<[email protected]> wrote:
Thanks for the update Karaf.
For the wrapper, you can use respawn (on Unix).
For the perm, it looks like a framework "issue" (we have to dig around).
Regards
JB
On 12/15/2011 06:18 PM, Dan Tran wrote:
Here are notes after playing with dev:restart:
1. Permgen still leaks
2. Works only in main karaf shell ( ie invoke bin/karaf ). When I
ran it as a service via wrapper and use bin/client to assess karaf
shell, dev:restart kill my karaf.
So it seems we need a cold restart.
-D
On Thu, Dec 15, 2011 at 9:02 AM, Dan Tran<[email protected]> wrote:
I am using 2.2.x, can I invoke dev:restart in my own bundle? any side
affect on this since my bundle also get restart.
Thanks
-D
On Thu, Dec 15, 2011 at 8:48 AM, Jean-Baptiste Onofré<[email protected]>
wrote:
It's already possible:
- in the console: dev:restart for 2.2.x version, system:restart for
trunk
(3.0)
- for the MBean, it's in org.apache.karaf:type=dev in Karaf 2.2.x
(restart()
operation), or org.apache.karaf:type=system in Karaf 3.0.0 (trunk,
restart()
operation)
Regards
JB
On 12/15/2011 05:39 PM, Dan Tran wrote:
Looks like the permgen issue is here for a long time. How about
adding ability for karaf to restart itself ( Hudson, and eclipse can
do this i think ). May be via webconsole, or JMX
Eager to hear how we could implement such feature for karaf.
-D
---------- Forwarded message ----------
From: Dan Tran<[email protected]>
Date: Thu, Dec 15, 2011 at 12:23 AM
Subject: Re: Infamous permgen leak
To: [email protected]
It is about feature to be loaded in and out of karaf dynamically. So
I guess is a known issue to 'java', karaf is not an exception :(
Wonder if ACE can solve this issue
-D
On Thu, Dec 15, 2011 at 12:15 AM, Jean-Baptiste Onofré<[email protected]>
wrote:
Hi Dan,
just to understand your issues:
- if you talk about the feature service itself, I'm agree that it
shouldn't
consume perm
- but the loaded classes (loaded by the feature service) consumes
perm,
and
it's a normal behavior (it's exactly the same with on Tomcat with
hot-deployment for instance)
Regards
JB
On 12/15/2011 08:36 AM, Dan Tran wrote:
Hello Karaf Team
Each time I reinstall/update a feature at runtime, my karaf loses
some
permgen. Amount depending on number to classes I have. Is there any
one able to address this issue?
Setting JVM to -XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled doesnot help.
-Dan
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com
--
--
*Achim Nierbeck*
Apache Karaf<http://karaf.apache.org/> Committer& PMC
OPS4J Pax Web<http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer&
Project Lead
blog<http://notizblog.nierbeck.de/>