Processing (Java Core version) sometimes lags

Hi Guys,
I’m doing a multiplayer coop / vs game and I’m having a big problem. sometimes everything works. My program has a constant 60 fps (check via eys and processing.framerate) and then there are these runs where Processing says my program has 60 fps but that’s not true. I used a VideoRecorder to check where the problem is, and found out that these runs are only redrawn <50 times per second. How can I solve this ???
Task manager:
CPU: 39% (my game) | approx. 50% (total)
RAM: 400 MB / 8 GB | 4.8 GB (total) (Firefox, eclipse, Co.)
GPU: 19% | approx. 20% (total)

Thank you.

I found out that my video recorder isn’t recording 60 fps but the problem stays. It looks just like 30 - 50 fps