Hello everyone, I hope someone can help me, integrate Spring Boot and primefaces I am using the @Named and @ViewScoped annotation the problem I am having is that the controllers (managedbeans) are not being removed from memory, even if I change the user to different Pages, the instances (objects) of each controller are running out of memory causing the server to become very slow, does anyone have any idea why this is happening? Or how can I eliminate those beans that are no longer being used?
Thanks so much
Memory Leak Problem
-
- Posts: 85
- Joined: 01 Mar 2018, 12:29
You use Spring aus DI-Framework instead of CDI?
That´s what we do in our organisation. And this should work without memory leaks.
Do you use Spring or CDI - Annotations? (You need the Spring-Annotations.)
When necessary i can look into our codebase tomorrow and give you some hints?
You already use die Spring-EL-Resolver?
That´s what we do in our organisation. And this should work without memory leaks.
Do you use Spring or CDI - Annotations? (You need the Spring-Annotations.)
When necessary i can look into our codebase tomorrow and give you some hints?
You already use die Spring-EL-Resolver?
have you tried to limit the number of ViewScoped beans in web.xml
Mojarra:
MyFaces:
That will force the 16th one out of memory.
Mojarra:
Code: Select all
<!-- reduce saved view states -->
<context-param>
<param-name>com.sun.faces.numberOfViewsInSession</param-name>
<param-value>15</param-value>
</context-param>
Code: Select all
<!-- reduce saved view states -->
<context-param>
<param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
<param-value>15</param-value>
</context-param>
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
I'm using Spring Boot with Joinfaces
In managedbeans i'm using @Named and @ViewScoped (this instances never are destroyer, the instance are acumulated and the application slow until restart the application)
Service and data layer (Spring Annotations)
@Autowired @Service and @Repository (all of this are singleton without problem)
In managedbeans i'm using @Named and @ViewScoped (this instances never are destroyer, the instance are acumulated and the application slow until restart the application)
Service and data layer (Spring Annotations)
@Autowired @Service and @Repository (all of this are singleton without problem)
Your help is appreciate it... Please help me i'm using Spring Boot with Joinfaceschristophs78 wrote: ↑25 Mar 2020, 22:04You use Spring aus DI-Framework instead of CDI?
That´s what we do in our organisation. And this should work without memory leaks.
Do you use Spring or CDI - Annotations? (You need the Spring-Annotations.)
When necessary i can look into our codebase tomorrow and give you some hints?
You already use die Spring-EL-Resolver?
I already found the real problem, if I invoke a / logout and in that method I invoke system.gc () if it deletes the instances, but if for some reason I do not logout and just close the browser the instances continue and continue accumulated in memory.
Any idea to this?
Any idea to this?
Are you using MyFaces or Mojarra with JoinFaces?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 18 guests