Glenn Holmer wrote:
> We've started receiving the dreaded "OutOfMemoryError: unable to create
> new native thread" on a @Schedule job. Aside from the obvious need to
> find and fix that, our immediate concern is that @Schedule jobs appear
> to get backed up when this happens, and do not resume even after
> GlassFish is restarted.
>
> I checked this URL:
>
> http://localhost:8080/ejb-timer-service-app/timer
>
> on several machines running the same app, and on one that hasn't had
> this problem, we see what we would expect: "There are 8 active
> persistent timers on this container" (there are 8 @Schedule annotations
> in our code). On two machines that have experienced this problem, we see
> numbers of 35 and 31.
>
This is strange. No "new" timers should be created.
> I have two questions:
>
> 1) How do we purge those "stuck" timer jobs?
> 2) What happens if I use "persistent=false" in the @Schedule annotation?
> Will they still run if the server is restarted, or only on a deploy?
>
"persistence=false" would mean create on restart.
-marina