I don't claim to be any sort of expert on JVM memory (and the model seems
to change quite regularly) but the error did specifically mention
Metaspace.  And from what I remember, GC tuning is different for Heap as
opposed to Metaspace.  One thing I do remember is that Metaspace should be
capped otherwise problems could occur.

I thought it might be worth adding in the two Metaspace parameters in
netbeans.conf, see if it makes a difference.  But if Metaspace changed
since I last had memory problems (quite a while ago), then I'd better take
a look at it again soon :-).


Cheers
Chris
Riga


On Tue, Dec 30, 2025 at 4:22 PM Michael Bien <[email protected]> wrote:

>
>
> On 12/30/25 10:29, Chris Powell wrote:
> > JM
> >
> > Does this happen when running code in NB?  It could be a memory leak in
> a class of yours and there are various tools to help track them down.
> >
> > I would first try increasing metaspace with: XX:MetaspaceSize and
> -XX:MaxMetaspaceSize when starting NB (netbeans.conf).
>
> setting -Xmx (max heap size) to a larger value is sufficient these days
> since metaspace is dynamic (in contrast to old permgen - which was fixed)
> and will grow until there is no space left.
>
> -mbien
>
>
> >   If the problem persists and you're not running code, it could be an NB
> memory leak.
> >
> >
> > Chris Powell
> > Riga
> >
> > On Tue, Dec 30, 2025 at 8:25 AM Jean-Michel DELFINO (Logarithmes) <
> [email protected]> wrote:
> >
> >     I’m working all the day in a big java server project with netbeans 27
> >
> >     I sometimes have this error :
> >     java.lang.OutOfMemoryError: Metaspace
> >
> >     And I must quit and re-open NB...
> >
> >     I have 64Go ram on my MacBook, I think it’s a limit in a config file
> somewhere in NB… But where ?
> >
> >     If someone could help me !
> >
> >     Thanks a lot !
> >
> >     JM
> >
> >
> >
> >     ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: [email protected]
> >     For additional commands, e-mail: [email protected]
> >
> >     For further information about the NetBeans mailing lists, visit:
> >     https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
>
>

Reply via email to