question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add serializer-cache size limit to avoid Metaspace issues from caching Serializers

See original GitHub issue

I know this is a topic that has been discussed before (#489 & #1905), but it has been a few years so I wanted to open the discussion again.

I see that there are changes coming in 3.0 to limit the size of the serializer cache to 4000 (#1994). Are there any other plans to allow tuning this size, adding a ‘super flush’, or letting the consumer provide the cache implementation (ex. with weak references)?

Our app servers have a lot of DelegatingClassLoaders sticking around due to reflection methods being stored in the SerializerCache(like _accessorMethod in BeanPropertyWriter) and it would be great if we had more control over the caching strategy so metaspace doesn’t grow unbounded.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
cowtowncodercommented, Oct 27, 2021

Yeah, Jackson 1.x has not been modified in literally years and I have no way to actually publish any of jars even if I did change the copy Github has. So issues it has will remain issues unless someone forks the build (or implements proper Maven build).

As to 2.x, sure, PRs welcome! I do not necessarily have time to make changes but can usually help others get PRs merged.

2reactions
yawkatcommented, Oct 27, 2021

@cjimenez1 The codehaus implementation is Jackson 1.x and hasn’t seen a release for 8 years. You should upgrade to Jackson 2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solving java.lang.OutOfMemoryError: Metaspace error
OutOfMemoryError: Metaspace indicates that the amount of native memory allocated for Java class metadata is exausted. Let's how this issue.
Read more >
Java OutOfMemoryError Exceptions: Causes & Fixes [Tutorial]
OutOfMemoryError: Metaspace error is thrown. To mitigate the issue, you can increase the size of the Metaspace by adding the -XX: ...
Read more >
Email patch
The Java Heap base address is the +# maximum limit for the native heap growth. ... sizes (-Xss) +# Set larger code cache...
Read more >
Troubleshooting Microservice's OutOfMemoryError: Metaspace
It indicates Garbage collection events aren't able free up Metaspace. It clearly indicates there is a memory leak in the Metaspace region. Root ......
Read more >
47.113.125.96:3000/baigg91zb/tycx_gps/commit/bffc3...
+# Native memory allocation (malloc) failed to allocate 1510096 bytes for ... the process size limit was hit +# Possible solutions: +# Reduce...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found