R-ArcGIS / r-bridge

Bridge library to connect ArcGIS and R, including arcgisbinding R library.
Apache License 2.0
118 stars 26 forks source link

Published GP Process is canceled before it's finished #45

Open BDvirus opened 3 years ago

BDvirus commented 3 years ago

Steps to reproduce

Publish GP Process with simple R Script. Just print datetime every 10 seconds.

message("Start")
tool_exec <- function(in_param, out_param)
{

  result = tryCatch({

  for (i in 1:1000)
    {      
      date_time<-Sys.time()
      message(i, ": ", date_time)
      while((as.numeric(Sys.time()) - as.numeric(date_time))<10){
      } #dummy while loop
    }

  }, warning = function(w) {
    print(paste("w:  ",w))
  }, error = function(e) {
    print(paste("e:  ",e))
  }, finally = {
    message("finally completed") 
  })

}

Current behaviour (bug)

The script Cancelled before finish. esriJobMessageTypeAbort: Cancelled script timeoutTest... esriJobMessageTypeAbort: (timeoutTest) aborted by User.

image

Expected behaviour (correct)

Script should running more than 70 seconds (1 Minute and 10 Seconds)

Testing.

Tested with:

Arcgis server 10.6 CRAN R-3.6.1 R-bridge v1.0.1.239 Published with Arcgis Pro 2.6.0

Also Tested with

Arcgis server 10.6 Microsoft R Open 4.0.2 R-bridge v1.0.1.241 Published with Arcgis Pro 2.6.0

Additional info

As standalone tool inside Arc pro it's working.

orhuna commented 3 years ago

@BDvirus thanks for the detailed repro above. Moving this to our internal repo and will post back once this is fixed or we have a workaround

MichaelGGeoda commented 3 years ago

Hello, same problem here. Spent days trying various configuration changes, adding memory, various versions of ArcGIS etc. The GP always fails after 70 seconds and my project is pretty stuck. No problem running from Pro. Hope for the fast solution.

orhuna commented 3 years ago

@MichaelGGeoda we are working with Portal team to investigate the timeout limit. Will get back to you with updates.

MichaelGGeoda commented 3 years ago

Do you have some updates? A lot of problems with clients....

roman-ssys commented 3 years ago

Same problem happens for me. Looking forward for a solution.

orhuna commented 3 years ago

We are working on releasing a new version as we found a few problems that occur with 2.6.0+ also we are looking into the time limit for timeout. I will post back once the new version is out.

MichaelGGeoda commented 3 years ago

Thanks @orhuna. Can you give some estimation so I could inform my client? Thanks!

orhuna commented 3 years ago

@BDvirus @MichaelGGeoda this does not seem to be an R-ArcGIS Bridge issue. With the version you shared, 10.6, similar behaviour with the equivalent Python script is observed. Our colleagues at the Portal team indicated that this was an issue that was fixed after 10.6. This issue might be resolved by updating ArcGIS Server.

BDvirus commented 3 years ago

Thanks @orhuna,

I understand that it might be not an R-Bridge issue but you are the only one that can collaborate with portal team to try resolve this. Unfortunately same issue at Arcgis Server 10.7.1. 😔

RayaGal commented 3 years ago

Hi, I have encountered with the same problem in my project. Using Arcgis server 10.7.1 and R-bridge v. 1.0.1.241.