连接Cisco AnyConnect VPN时RStudio运行极慢/无响应问题求助
环境信息
- R版本:4.3.2 (2023-10-31)
- RStudio版本:2023.12.1.0
- Cisco Secure Client - AnyConnect VPN:Revision 6
连接Cisco AnyConnect VPN时,RStudio运行极慢,有时甚至无响应,且情况时好时坏。在办公室断开以太网连接VPN时,RStudio虽有卡顿但尚可接受,存储在网络驱动器的项目打开延迟也不高,但读写网络驱动器仍存在一定延迟。
居家办公时,团队多名成员均遇到更严重的延迟问题。旧版RStudio(2023.12.0.0)中,打开网络驱动器上的项目时RStudio会直接崩溃,并显示如下错误:
Cannot Connect to R. RStudio can’t establish a connection to R. This usually indicates one of the following:
The R session is taking an unusually long time to start, perhaps because of slow operations in startup scripts or slow network drive access.
RStudio is unable to communicate with R over a local network port, possibly because of firewall restrictions or anti-virus software.Please try the following:
If you’ve customized R session creation by creating an R profile (e.g. located at {{-rProfileExtension}} consider temporarily removing it.
If you are using a firewall or anti-virus software which guards access to local network ports, add an exclusion for the RStudio and rsession executables.
Run RGui, R.app, or R in a terminal to ensure R itself starts up correctly.Further troubleshooting help can be found at our website…
升级至当前版本RStudio(2023.12.1.0)后,打开网络驱动器上的项目不再崩溃,但打开耗时极长。脚本打开速度也很慢,居家时点击渲染按钮完全无响应,仅能勾选“保存时渲染”选项后保存文件来完成渲染——原本办公室未连VPN(以太网连本地网络)时仅需1分钟渲染的文档,现在至少需要5分钟。
RStudio运行极慢时,控制台有时会出现绿色无穷符号;有时既无绿色无穷符号也无停止标识,但代码最终仍会运行。
已通过运行RGui(R version 4.3.2)确认R本身启动正常,该应用启动迅速且无异常。
找到过类似问题的讨论,但未得到明确解决方案:
- R Studio incredibly slow only after I connect to my work VPN?
- RStudio slow response over VPN
- RStudio相关GitHub issue
目前唯一可行的临时解决方法是完全脱离项目环境,直接打开并编辑脚本,但所有操作仍明显变慢(仅比打开网络驱动器上的项目情况稍好)。升级至新版RStudio(2023.12.1.0)后情况略有改善,但问题仍存在。
由于所在领域高度保密,无法提供截图、脚本或代码等信息,但可提供其他不涉及工作电脑机密的内容。
希望先明确问题原因,再联系IT部门,避免因未知问题导致电脑被重装。
这是首次在StackOverflow发帖,若格式或内容存在问题,请告知以便修正。
感谢帮助!
内容的提问来源于stack exchange,提问作者ja1305

