Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Java remote debugger extremely slow over VPN

I sometimes am forced to work away from my office, meaning that I need to VPN into my lab. I've noticed that remote-debugging with Eclipse in this situation is horrendously slow. Slow to the point where it takes 5-7 minutes for the debugger to attach to the remote jvm. After connection, stepping through breakpoints/lines can take 20-30 seconds each time, and it routinely just drops the connection, making me have to start over again.

Can anyone explain why this is, even if there is no available solution? My latency through the VPN isn't nearly what one would expect given the behaviour of the remote-debugger. I do all kinds of other stuff over the VPN with minimal lag/obstruction.

I'm really struggling to understand why the remote-debugger is so afflicted by the VPN, when basically every other network operation is fine.

Thanks,

like image 836
user3062946 Avatar asked Feb 10 '15 13:02

user3062946


2 Answers

Thanks for attempting to help, guys. Luckily a colleague of mine, plagued by the same problems, did a deep dive into it. From my colleague's correspondence:

"I set up a proxy sitting between my Eclipse and my VM which printed out command codes from JDWP packets my Eclipse was sending to my VM. http://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html page explained me what those commands meant. What I saw was: every time I stepped through the code Eclipse was sending dozens and dozens of "thread monitor" - related commands to VM. They are related to the following VM capabilities: canGetMonitorInfo, canGetCurrentContendedMonitor, canGetOwnedMonitorInfo, canGetMonitorFrameInfo"

Those capabilities are causing the insane amount of lag. He has cooked up a solution that forcably disables those capabilities, and the usability of the debugger has skyrocketed. Obviously the thread-monitoring functionality of the remote debugger no longer works, but given how unusable the remote debugging was previously, this is a great compromise.

I'll attempt to find out what exactly he did to disable the thread-monitor capabilities.

like image 140
user3062946 Avatar answered Nov 14 '22 10:11

user3062946


Disabling Show monitor indeed helped me.
The Bottom facing triangle is difficult to spot in debug perspective. So Just posting the image which is missing in the link.

enter image description here

like image 42
peeyush Avatar answered Nov 14 '22 10:11

peeyush