You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2004/01/04 13:26:23 UTC
The Thread Promiscousity issue.
Everyone,
I have taken away the creation of plenty of threads in Merlin, and have
attempted to put in a Deployment Timeout, i.e. If a component or a container
takes too long to deploy, the deployment subsystem will try to interrupt()
the deployment, and if that succeeds, throw a DeploymentException, and if
interrupt() doesn't succeed, a FatalDeploymentException is thrown and it is
the intention that the JVM should shut down completely.
In effect, the AbstractBlock creates a Deployer instance, which in turn
creates a single thread that sequentially will deploy the
components/containers in the container managed by the Block. The
DeploymentThread, created by the Deployer will call the deploy() methods, so
that the main thread can monitor the progress and attempt to interrupt if it
takes too long.
To allow for the Deployment Timeout to be user settable (defaults to a long 5
seconds), I have also introduced that the kernel can have general-purpose
parameters.
The deployment timeout is therefor set in kernel.xml (or equiv.)
<kernel>
<parameters>
<parameter name="deployment-timeout" value="1500" />
</parameters>
</kernel>
Other internals may be "tunable" in this manner in the future.
This has been committed to the HEAD, and will be part of the Merlin 3.3
release after some more testing.
Documentation has been updated, but my MAVEN(!) refuses to generate the site
documentation, so I can't even validate that I haven't missed anything in the
formatting.
Cheers
Niclas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: The Thread Promiscousity issue.
Posted by Niclas Hedhman <ni...@hedhman.org>.
On Sunday 04 January 2004 23:39, Stephen McConnell wrote:
> Problem was deployment timeout. For some reason James goes through the
> initial startup and (as far as cpu consumption is concerned) goes almost
> silent, then finally some activity about 30-45 seconds post deployment.
> To get things operational I've set a 60 sec deployment timeout and
> things are working fine.
Changed by the yet-to-be-tested kernel.xml Parameters, or by updating the
source code's default value??
> Noel - does this sound normal/expected?
Typical component behaviour. Aggressive allocation of resources.
> p.s. Have update the deployment exceptions to provide information about
> the time value associated with the fail condition.
Niclas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: The Thread Promiscousity issue.
Posted by Stephen McConnell <mc...@apache.org>.
Stephen McConnell wrote:
> Niclas Hedhman wrote:
>
>>
>>
>>
>> This has been committed to the HEAD, and will be part of the Merlin
>> 3.3 release after some more testing.
>
>
> Niclas:
>
> I'm getting the following startup failure in James.
> Is this related to the deployment timeout? If so I think we need to do
> some work on the error message returned.
Problem was deployment timeout. For some reason James goes through the
initial startup and (as far as cpu consumption is concerned) goes almost
silent, then finally some activity about 30-45 seconds post deployment.
To get things operational I've set a 60 sec deployment timeout and
things are working fine. Noel - does this sound normal/expected?
Stephen.
p.s. Have update the deployment exceptions to provide information about
the time value associated with the fail condition.
--
|------------------------------------------------|
| Magic by Merlin |
| Production by Avalon |
| |
| http://avalon.apache.org/merlin |
| http://dpml.net/ |
|------------------------------------------------|
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: The Thread Promiscousity issue.
Posted by Stephen McConnell <mc...@apache.org>.
Niclas Hedhman wrote:
>
>
>
> This has been committed to the HEAD, and will be part of the Merlin 3.3
> release after some more testing.
Niclas:
I'm getting the following startup failure in James.
Is this related to the deployment timeout? If so I think we need to do
some work on the error message returned.
Stephen.
INFO | jvm 1 | 2004/01/04 15:22:54 | SMTP Service started plain:25
INFO | jvm 1 | 2004/01/04 15:22:55 |
---- exception report -------------------------------------------------
INFO | jvm 1 | 2004/01/04 15:22:55 | Exception:
org.apache.avalon.merlin.KernelException
INFO | jvm 1 | 2004/01/04 15:22:55 | Message: Kernel startup failure.
INFO | jvm 1 | 2004/01/04 15:22:55 | ---- cause
---------------------------------------------------------------------
INFO | jvm 1 | 2004/01/04 15:22:55 | Exception:
org.apache.avalon.merlin.KernelException
INFO | jvm 1 | 2004/01/04 15:22:55 | Message: Application
deployment failure.
INFO | jvm 1 | 2004/01/04 15:22:55 | ---- cause
---------------------------------------------------------------------
INFO | jvm 1 | 2004/01/04 15:22:55 | Exception:
org.apache.avalon.activation.appliance.DeploymentException
INFO | jvm 1 | 2004/01/04 15:22:55 | Message: Deployable
'block:/james' hanged during deployment and was interrupted.
INFO | jvm 1 | 2004/01/04 15:22:55 | ---- stack trace
---------------------------------------------------------------
INFO | jvm 1 | 2004/01/04 15:22:55 |
org.apache.avalon.activation.appliance.DeploymentException: Deployable
'block:/james' hanged during deployment and was interrupted.
INFO | jvm 1 | 2004/01/04 15:22:55 |
org.apache.avalon.activation.appliance.impl.DeploymentRequest.waitForCompletion(DeploymentRequest.java:94)
INFO | jvm 1 | 2004/01/04 15:22:55 |
org.apache.avalon.activation.appliance.impl.Deployer.deploy(Deployer.java:97)
INFO | jvm 1 | 2004/01/04 15:22:55 |
org.apache.avalon.activation.appliance.impl.AbstractBlock.deploy(AbstractBlock.java:684)
INFO | jvm 1 | 2004/01/04 15:22:55 |
org.apache.avalon.merlin.impl.DefaultKernel.startup(DefaultKernel.java:411)
INFO | jvm 1 | 2004/01/04 15:22:55 |
org.apache.avalon.merlin.impl.DefaultFactory.create(DefaultFactory.java:580)
INFO | jvm 1 | 2004/01/04 15:22:55 |
org.apache.avalon.merlin.cli.Main.<init>(Main.java:329)
INFO | jvm 1 | 2004/01/04 15:22:55 |
org.apache.avalon.merlin.cli.Main.main(Main.java:281)
INFO | jvm 1 | 2004/01/04 15:22:55 |
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2004/01/04 15:22:55 |
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2004/01/04 15:22:55 |
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2004/01/04 15:22:55 |
java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 1 | 2004/01/04 15:22:55 |
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:102)
INFO | jvm 1 | 2004/01/04 15:22:55 | java.lang.Thread.run(Unknown
Source)
INFO | jvm 1 | 2004/01/04 15:22:55 |
--------------------------------------------------------------------------------
--
|------------------------------------------------|
| Magic by Merlin |
| Production by Avalon |
| |
| http://avalon.apache.org/merlin |
| http://dpml.net/ |
|------------------------------------------------|
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org