cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <>
Subject RE: Weird multithreading bug in Cron block
Date Wed, 08 Jun 2005 05:56:28 GMT
A little bit off-toptic, but some time ago I used the pipeline machinery
to generate mail-content for users, somewhere at night by a CRON job.
For each user, the pipeline was called and the results were sent to that
user. Processing such a pipeline from CRON took about 2 seconds for each
mail, while calling that pipeline (trough the CocoonServlet), processing
was done in less than 0.5 seconds. And after processing that pipeline
100 times (for 100 users), an OutOfMemoryError was thrown.

Any idea if this is related to your environment problems (CRON has it's
own environment, right?)


> -----Oorspronkelijk bericht-----
> Van: Sylvain Wallez []
> Verzonden: dinsdag 7 juni 2005 19:03
> Aan:
> Onderwerp: Weird multithreading bug in Cron block
> Hi all,
> I'm currently working on a publication application with complex
> queries where we want to prefetch some of the pages linked to by the
> page currently being produced, in order to speed up response time on
> pages that are likely to be asked for by users.
> To achieve this, we have a "PrefetchTransformer" that grabs elements
> having a prefetch="true" attribute and starts a background job to load
> the corresponding "src" or "href" URL using a "cocoon:".
> At first I used JobScheduler.fireJob() to schedule for immediate
> execution, but went into *weird* bugs with strange NPEs all around in
> pipeline components. After analysis, it appeared that while the
> scheduler thread was processing the pipeline, the http thread was
> recycling the *background environment*, thus nulling the object model
> and other class attributes used by pipeline components.
> I spent the *whole day* trying to find the cause for this, without
> success (how frustrating).
> Then I decided to try another approach and use
> JobScheduler.fireJobAt(new Date()), meaning "schedule the job for
> execution... now!". And it worked!
> Weird, weird, weird! Anybody having a hint about why fireJob() is
> this environment mixture?
> Sylvain
> --
> Sylvain Wallez                        Anyware Technologies
> Apache Software Foundation Member     Research & Technology Director

View raw message