Sphere
Log in Join
☆ 10

PyCharm keeps freezing with GC overhead limit exceeded on 16GB

PyCharm 2023.3.4, Windows 11, 16GB RAM, project with about 5000 files including a vendored JS bundle. The IDE freezes every 20 minutes with java.lang.OutOfMemoryError: GC overhead limit exceeded in idea.log. I set -Xmx4096m in vmoptions but it still happens. What else can I do? I'm about to start hiding files just to get through a workday. Heap dumps aren't especially helpful — everything looks like index data and model caches.

⚑ Report

4 replies

☆ 0
P plastic33 ·2026-10-08#1

Check Help > Edit Custom VM Options — if there's an -Xmx there it overrides what you set elsewhere. Also make sure PyCharm is on a 64-bit JDK, which it ships by default. GC overhead means it's spending more time collecting than working, usually from too little heap relative to live data.

⚑ Report
☆ 0
Y yaml ·2026-10-16#2

vmoptions has -Xmx4096m and -Xms1024m. idea.log shows heap usage around 3.8GB right before it dies, so it is hitting the cap. Should I just go higher, or is that treating the symptom? I have 16GB total and Chrome is usually open, so I don't want to starve everything else.

⚑ Report
☆ 0
G ghost ·2026-10-19#3

Try -Xmx6144m but leave room for the OS and your browser. More important: exclude that vendored JS bundle from indexing. Mark it as excluded or lower idea.max.intellisense.filesize in idea.properties. Vendored files are the usual culprit for memory blowups. In our case a single generated 12MB bundle was responsible for most of the pressure.

⚑ Report
☆ 0
F ferret21 ·2026-10-24#4

Also turn off power-save mode and disable plugins you don't use, especially anything that analyzes the whole project. We cut our memory usage roughly in half by excluding node_modules and dist. If it still happens, File > Invalidate Caches and restart.

⚑ Report
Log in to reply.