[
https://issues.redhat.com/browse/WFLY-13514?page=com.atlassian.jira.plugi...
]
Matěj Novotný commented on WFLY-13514:
--------------------------------------
First of all, huge thanks for this reproducer! It makes it so much easier to discuss
things on a common ground.
As for the issue, the scope here is definitely going to matter. You cannot get OOM when
you use {{@ApplicationScoped}} as you will have only one instance active. Try adding
{{@Named}} and {{@ApplicationScoped}} on that bean instead of {{@Model}} and it won't
crash.
Likewise, when you use {{@SessionScoped}} you will run OOM because for each {{curl{{ you
create new session and you do that much faster then those session can timeout (or be
anyhow invalidated) hence your post construct code allocating bytes will cause the OOM
eventually.
So I think we should specifically talk about request scope where the behaviour is really
awkward. I can see that for each request, we correctly create a bean instance and I can
also see that after each request we attempt to destroy it (if you add {{@PreDestroy}}
callback, you can see that it will be invoked).
I'm going to look at the heap dump and what keeps the references...
Huge memory leak in WildFly
---------------------------
Key: WFLY-13514
URL:
https://issues.redhat.com/browse/WFLY-13514
Project: WildFly
Issue Type: Bug
Components: CDI / Weld, JSF
Affects Versions: 18.0.1.Final, 19.1.0.Final, 20.0.0.Beta1
Reporter: Konrad Bak
Assignee: Matěj Novotný
Priority: Critical
https://github.com/konbk/bug-report-wildfly-oome
The project shows a huge memory leak introduced in recent WildFly versions that can crash
a real-world Java EE application in a matter of hours.
When a JSF page contains any component bound to page variable, all CDI beans (regardless
of scope) used on that page stay in memory.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)