Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Intermittant error with connecting to server #53

Open
seharnoorshah opened this issue Dec 30, 2016 · 1 comment
Open

Intermittant error with connecting to server #53

seharnoorshah opened this issue Dec 30, 2016 · 1 comment

Comments

@seharnoorshah
Copy link

I have been using RForcecom for a couple months now and I love it. I log in everyday and download some information-- its seamless. However, every other day, I seem to get an issue with creating my connection, and then the error goes away by itself. This is the error I get:

session <- rforcecom.login(sfn, sfp, instanceURL, apiVersion)
Error in curl::curl_fetch_memory(url, handle = handle) :
Couldn't connect to server

I know the login/website information I'm putting in is correct because it does log in most of the time. The packages are all up to date (including RCurl) and I am running this without any other packages (just in case). Has anyone else experienced this?

@StevenMMortimer
Copy link
Contributor

@seharnoorshah I've sometimes got funny things like this and I assume it's something with the HTTP messaging between your computer and the salesforce server. You can do 2 things:

  1. Wrap your function or code inside try block and have it re-run if it errors. Sometimes the intermittent nature of the call means it will not work one minute, then it will when you retry.

  2. You can mess around with the http package options and see if it helps. For example,

set_config( config( ssl_verifypeer = 0L ) )

You can explore all possible options using httr_options()

I hope that helps and feel free to report back anything you find. Anything helps!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants