Apex class deployments in RubyMine frequently hang

Issue #1388 resolved
Tom Fuda created an issue

Scott,

Since switching to RubyMine as my IlluminatedCloud IDE, I’ve been observing that quite frequently (maybe 15% of the time), I’ll try to save an Apex class. The progress indicator will appear at the bottom of the IDE’s task bar, but it appears to get stuck and never complete the deployment. I’m using a classic metadata project, and I’ve got the IDE configured to prefer the Tooling API for Apex class deployment. I’m attaching the idea.log of a stuck save operation. The event occurs in the log at timestamp [846972] in the attached log. Is there anything else I can provide that would be helpful in isolating this issue?

Comments (14)

  1. Tom Fuda Account Deactivated reporter

    I just ran a deployment that appeared to hang, but after 8+ minutes, it actually completed. I’m going to uncheck the “Prefer Tooling API for Apex” checkbox to see if that helps any.

  2. Tom Fuda Account Deactivated reporter

    Actually, I suspect it IS an issue with the Tooling API, because I went back and checked my deployment settings in the IntelliJ Community Edition that I was using as my IlluminatedCloud IDE and I see that I unchecked that “Prefer Tooling API for Apex” there.

  3. Scott Wells repo owner

    Tom, I'd likely need to see a log with debug logging enabled for metadata deployment from just after/during the issue. My guess is that it's not anything to do with RubyMine as the deployment engine is identical across IDEs and doesn't really interact with the plugin SDK other than to provide a progress indicator. Based on your last comment, my guess is that you're just seeing slow deployments down one or the other API. The logs would provide insight into that for sure.

  4. Tom Fuda Account Deactivated reporter

    Of course, now I’m having trouble reproducing the problem. If I can reproduce it again, I will capture a log and attach it.

  5. Tom Fuda Account Deactivated reporter

    Ok, so I finally managed to capture a more detailed log of one of these stuck deployments. In this case, I tried to deploy a single changed Apex class. The log file is attached. The deploy operation starts toward the bottom of the log, at timestamp [61037019] in the latest attached log.

  6. Scott Wells repo owner

    Thanks, Tom. Yeah, it's just sitting in the Tooling API's async deployment queue (which is pretty unusual; the Metadata API has these issues much more often). Unfortunately there's nothing I can do about that in IC. What I can do is connect you with some folks at Salesforce who have been investigating these issues with long queue lengths so they can see if there's anything they can adjust on their side. They'll need your org and instance IDs and ideally the IDs of some long-running jobs. Luckily the attached log contains one such ID, metadata container ID 1dc3i000000WeIeAAK. Shoot me an email directly if you'd like me to make the connection for you.

  7. Scott Wells repo owner

    I'm going to resolve this since it's all happening server-side, but I'm happy to facilitate an introduction to the appropriate folks at Salesforce.

  8. Tom Fuda Account Deactivated reporter

    Thanks, we’re ISV partners, and have paid partner support, so I have the ability to open cases with them. Honestly, we’ve got a pretty big metadata project with a lot of Apex classes and cross-package dependencies. Frankly, I’ve seen more problems with the Tooling API when deploying Apex classes than the Metadata API. I think it is due to the complexity of our projects.

  9. Scott Wells repo owner

    If that's the case, you can always disable deployment via the Tooling API in IC and see if that improves the situation for you. Take a look at the user guide under Prefer Tooling API for. I'll be curious to hear whether that helps or not.

  10. Tom Fuda Account Deactivated reporter

    Yes, that is what I have done. That is also how I had Intellij with IC configured for the last year. I only started noticing this issue when I switched to RubyMine, which defaulted to the Tooling API. I haven’t had any issues since switching, but it has only been a day.

  11. Scott Wells repo owner

    Glad to hear that's improved it for you. It's still very odd that the tooling API is performing so poorly for you. I do think it's worth letting Salesforce know about that for sure.

  12. Log in to comment