– I am working on a database in EViews that uses an external interface to R to perform certain tasks such as extracting data from Eurostat or performing transformations either not available or very difficult in EViews.
I keep getting the attached message however when doing this. The task is usually successful but I sometimes will wait 30 mins or so – even for relatively small transformations. Other times it will just crash EViews.
Has anyone else had this issue? It is the same on and off my organisations VPN so I don't think its a network issue.
The version is EViews RConn x64 (R Version 4.1.1) so was thinking it might be an update issue?
CNR
Trouble with RConn
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
Trouble with RConn
- Attachments
-
- Sever Busy.GIF (18.18 KiB) Viewed 531 times
-
- EViews Developer
- Posts: 749
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Trouble with RConn
The "Server Busy" dialog will appear when Windows COM (used by EViews to talk to R in this case) doesn't hear back from R within a certain time frame (I believe 60 seconds is the default).
If you want EViews to wait forever during it's calls to R, you can use the COMTIMEOUT command (introduced in EViews 10) to set the timeout value to zero BEFORE you call XOPEN, like this:
This should prevent the "Server Busy" dialog from appearing.
Now as to why your R call is taking longer than 60 seconds, you'll have to debug that on the R side. The most likely reason is because Eurostat itself is busier at certain times than others. So if your R code is downloading data from Eurostat, then that's where I would look first. Try writing to an external log file (or the console) both before and after the download so that you can see how long various steps are taking.
After looking at your timestamps, if you still think the slowness is with EViews, please provide the following details:
1. Your EViews version and build date (make sure you install the latest patch for your version if you haven't already)
2. Your R version and bitness (32 or 64?)
3. If possible, provide a short EViews program (or R program) that can replicate the issue.
Steve
If you want EViews to wait forever during it's calls to R, you can use the COMTIMEOUT command (introduced in EViews 10) to set the timeout value to zero BEFORE you call XOPEN, like this:
Code: Select all
COMTIMEOUT(0)
XOPEN(r)
Now as to why your R call is taking longer than 60 seconds, you'll have to debug that on the R side. The most likely reason is because Eurostat itself is busier at certain times than others. So if your R code is downloading data from Eurostat, then that's where I would look first. Try writing to an external log file (or the console) both before and after the download so that you can see how long various steps are taking.
After looking at your timestamps, if you still think the slowness is with EViews, please provide the following details:
1. Your EViews version and build date (make sure you install the latest patch for your version if you haven't already)
2. Your R version and bitness (32 or 64?)
3. If possible, provide a short EViews program (or R program) that can replicate the issue.
Steve
Re: Trouble with RConn
Hi Steve - Thanks for getting back to me on this. It doesn't seem to work no matter what the function is. Even this simple example of seasonal adjustment stalls and displays the same message. And in this case just stays busy without carrying out the command.
Here are details you asked for.
Your EViews version and build date: EViews 12 and March 3 2021
Your R version and bitness: R Version 1.4.1717 (64 bit)
'wfcreate u 2
'string x13locale
'x13locale = %9
'xopen(r)
'xput(rtype=list, name=x13locale) x13locale
'xrun install.packages("seasonal", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/")
'xrun X13_PATH = x13locale
'xrun Sys.setenv(X13_PATH = x13locale)
'xrun library(seasonal)
'xrun checkX13()
'xclose
'wfclose untitled
Here are details you asked for.
Your EViews version and build date: EViews 12 and March 3 2021
Your R version and bitness: R Version 1.4.1717 (64 bit)
'wfcreate u 2
'string x13locale
'x13locale = %9
'xopen(r)
'xput(rtype=list, name=x13locale) x13locale
'xrun install.packages("seasonal", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/")
'xrun X13_PATH = x13locale
'xrun Sys.setenv(X13_PATH = x13locale)
'xrun library(seasonal)
'xrun checkX13()
'xclose
'wfclose untitled
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13165
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Trouble with RConn
X13 is probably not a great test function. It is slow in R, and is complicated (since R itself is calling an external application).
Follow us on Twitter @IHSEViews
Re: Trouble with RConn
No worries Gareth - here is a more staright forward command. Just one variable from Eurostat which again stalls and can take up to 30 mins due to server busy issue.
xopen(r)
xrun library(SmarterPoland)
xrun tmp <- getEurostatRCV("irt_lt_mcby_q")
xrun tmp$time<- as.numeric(as.character(tmp$time))
xrun dat.m <- subset(tmp,(geo=="DE")& (int_rt=="MCBY") )
xrun dat.m$new<-(nrow(dat.m):1)
xrun library(reshape)
xrun castdata <- cast(dat.m,new ~ geo, value="values")
xrun castdata$new <- NULL
xget(name= GE_Q_R , type=series) castdata
GE_Q_R.label(d) Germany, EMU convergence criterion bond yields
LGE_Q_R.label(s) Eurostat, irt_lt_mcby_q
xopen(r)
xrun library(SmarterPoland)
xrun tmp <- getEurostatRCV("irt_lt_mcby_q")
xrun tmp$time<- as.numeric(as.character(tmp$time))
xrun dat.m <- subset(tmp,(geo=="DE")& (int_rt=="MCBY") )
xrun dat.m$new<-(nrow(dat.m):1)
xrun library(reshape)
xrun castdata <- cast(dat.m,new ~ geo, value="values")
xrun castdata$new <- NULL
xget(name= GE_Q_R , type=series) castdata
GE_Q_R.label(d) Germany, EMU convergence criterion bond yields
LGE_Q_R.label(s) Eurostat, irt_lt_mcby_q
Re: Trouble with RConn
Just an update question - I have updated R to the most recent version (R version 4.3.0). Now when I run xopen(r) I get the below message.
Any idea how to resolve this?
Thanks!
Any idea how to resolve this?
Thanks!
- Attachments
-
- error.GIF (40.81 KiB) Viewed 384 times
-
- Non-normality and collinearity are NOT problems!
- Posts: 3761
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Trouble with RConn
Go to options/General options/External program interface and change the path.
Re: Trouble with RConn
Just to update the Updated R Version 4.3.0 has same issue. Server busy message appears and can be 30 mins plus for even a single series.
-
- EViews Developer
- Posts: 749
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Trouble with RConn
I tried running your latest program using EViews 12 (Nov 4, 2022) and R v4.3.0 and it ran quickly (less than 5 seconds) and without issue.
Are you running this program from within the EViews GUI or are you running it differently? (such as via the command line or maybe even via COM automation?)
I suggest you update your EViews 12 to the latest version since it's more than a year older than what's available.
Also, try turning on LOGMODE at the start of your program and have it display each program line that is running so you can see where it hangs, like this:
(I also turned on autosave and specified an output filename so each log will get saved to the external file in case you're not using the EViews GUI).
Are you running this program from within the EViews GUI or are you running it differently? (such as via the command line or maybe even via COM automation?)
I suggest you update your EViews 12 to the latest version since it's more than a year older than what's available.
Also, try turning on LOGMODE at the start of your program and have it display each program line that is running so you can see where it hangs, like this:
Code: Select all
logmode(filename="c:/files/out.txt", autosave=on) p
Who is online
Users browsing this forum: Google [Bot] and 16 guests