jetbrains gatway & Pycharm & Codespaces Investigation #79105
Replies: 1 comment
-
Try doing these @tudorBonca : Adjust Memory Allocation: As you suggested, modifying the pycharm64.vmoptions file and lowering the Xmx and Xms values to a suitable level for your needs (around 58.6GB in your case) might resolve the memory conflict and allow Gateway to connect to the IDE successfully. Be sure to choose a memory allocation that meets the minimum requirements for your projects and avoid exceeding the available resources. Remember to backup the original pycharm64.vmoptions file before making any changes to avoid potential issues if the adjusted settings don't work as expected. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
While trying to run codespaces with gatway and Pycharm the following problem appeared.
=== FAILURES ====
The following exception failed the deployment
com.jetbrains.gateway.ssh.deploy.DeployException:
Details:
An error occurred while executing command: 'host-status --ide-path=/workspaces/.codespaces/shared/editors/jetbrains/pycharm-2023.1.1 --project-path=/workspaces/web'
Exit code: 1
at com.jetbrains.gateway.ssh.DeployFlowUtil$fullDeployCycleImpl$2.invokeSuspend(DeployFlowUtil.kt:303)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at com.intellij.openapi.rd.util.CoroutineProgressContext$Companion$create$task$1$3.invokeSuspend(BackgroundProgressCoroutineUtil.kt:174)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.intellij.openapi.rd.util.CoroutineProgressContext$Companion$create$task$1.invoke(BackgroundProgressCoroutineUtil.kt:170)
at com.intellij.openapi.rd.util.CoroutineProgressContext$Companion$create$task$1.invoke(BackgroundProgressCoroutineUtil.kt:160)
at com.intellij.openapi.rd.util.CoroutineProgressContext$Companion$createModal$1$1.run(BackgroundProgressCoroutineUtil.kt:205)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:428)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:115)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$9(CoreProgressManager.java:512)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:87)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:251)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:251)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:465)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.jetbrains.gateway.ssh.deploy.DeployException:
Details:
An error occurred while executing command: 'host-status --ide-path=/workspaces/.codespaces/shared/editors/jetbrains/pycharm-2023.1.1 --project-path=/workspaces/web'
Exit code: 1
at com.jetbrains.gateway.ssh.DeployFlowUtil$fullDeployCycleImpl$2.invokeSuspend(DeployFlowUtil.kt:298)
... 37 more
Caused by: com.jetbrains.gateway.ssh.deploy.DeployException:
Details:
An error occurred while executing command: 'host-status --ide-path=/workspaces/.codespaces/shared/editors/jetbrains/pycharm-2023.1.1 --project-path=/workspaces/web'
Exit code: 1
at com.jetbrains.gateway.ssh.DeployFlowUtil$fullDeployCycleImpl$2.invokeSuspend(DeployFlowUtil.kt:296)
... 37 more
Caused by: com.jetbrains.gateway.ssh.RemoteCommandException:
Details:
An error occurred while executing command: 'host-status --ide-path=/workspaces/.codespaces/shared/editors/jetbrains/pycharm-2023.1.1 --project-path=/workspaces/web'
Exit code: 1
at com.jetbrains.gateway.ssh.GoHighLevelHostAccessor.createException(GoHighLevelHostAccessor.kt:210)
at com.jetbrains.gateway.ssh.GoHighLevelHostAccessor.callAndGetError(GoHighLevelHostAccessor.kt:176)
at com.jetbrains.gateway.ssh.GoHighLevelHostAccessor.access$callAndGetError(GoHighLevelHostAccessor.kt:35)
at com.jetbrains.gateway.ssh.GoHighLevelHostAccessor$callAndGetError$1.invokeSuspend(GoHighLevelHostAccessor.kt)
... 37 more
==== ENVIRONMENT ====
INSTALLED PRODUCTS
AVAILABLE MEMORY
==== DIAGNOSTIC ERRORS ====
Could not get host jstack:
Details:
An error occurred while executing command: 'get-jstack --ide-path=/workspaces/.codespaces/shared/editors/jetbrains/pycharm-2023.1.1 --project-path=/workspaces/web'
Exit code: 1
In my opinion it is not working properly because when the codespace is created it allocates some memory for itself and when the gateway is trying to connect to the codespace it also tries to allocate the full memory of the codespace to the IDE but it can't, so it fails.
Solution:
Now, after the error appeared there is already a new IDE directory created, this should be the case for any jetbrains IDE (only tested for pycharm).
In the said directory you have to locate the file which is responsible for the memory allocation and reduce the values for your case.
In my case a 16 core 64GB RAM and 128GB machine was used.
The memory configuration file is found here:
/workspaces/.codespaces/shared/editors/jetbrains/pycharm-2023.1.1/bin
The file name:
pycharm64.vmoptions
The values that need to be changed are:
Xmx65536m
Xms65536m
This is actually 64GB the exact ram space of the codespace.
In order to make my setup work I reduced the size of the allocated memory to 60000 (around 58.6GB RAM).
So the change in the file would actually look like this:
Xmx60000m
Xms60000m
Beta Was this translation helpful? Give feedback.
All reactions