function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chris CageChris Cage 

Intermittent "Could not connect to host" errors using SOAP api breaks our application

We have a php application that is using the SOAP api to connect to Salesforce.  We have noticed intermittent issues with connecting to SF, which throw the error message “Could not connect to host”.  Following the stack trace it seems to be having issues at login with https://login.salesforce.com.  When the errors are occurring we can still connect to SF via a browser using the same user/pass, and other integrated solutions seem to be able to connect with the same user as well.  Eventually the connection to Salesforce corrects itself, but this happens without any updates on our end, so we are at a loss as to the root cause. 

We have checked allowed ip ranges for the user profile associated to the user, but those don’t seem to be a problem.  We have also checked to make sure the api calls aren’t maxing out and at the time of the last occurrence, we were at approximately 10% of our max.  It seems to be very similar to https://developer.salesforce.com/forums/ForumsMain?id=906F00000008r3jIAA, but that issue doesn’t seem to be answered fully.

Any help would be appreciated. Right now we have customers logging into our application and the reliablitiy is constanly in question because of this problem connecting to Salesforce. We never know when it will happen or how long the problem will last. About a week ago, we had almost 24 hours when our application could not connect. Again, with no changes on our end this problem just starts and stops.

Thanks,
Chris Cage
Chris CageChris Cage
UPDATE: After we continued testing we finally tried changing the DNS name server that our web server was configured for.

Since we updated to an alternative name server our problem seems to have been fixed. We continue to monitor.

We have not figured out why one name server was having trouble resolving login.salesforce.com and the other one does not have a problem.

Chris
Rene HernandezRene Hernandez

Hi Chris, 

I too am experiencing this issue with our application that logs in to SFDC via SOAP.  It is very intermittent and is causing discrepancies in our data.  Have you experienced the same intermittent issue since you updated the DNS of your web server?
 

Thanks for posting and for the help.
 

Rene

Chris CageChris Cage
Hi Rene,
Yes, we are still getting the issue but not nearly as often. The change in name servers helped (I still don't know why). We haven't seen extended connection problems we had before. Checking the recent logs it seems we get the "[SoapFault] Could not connect to host" error every week or so. We'll get a little cluster and then no problems for days.

I wish I had more info or any direction to a solution. If I get any other info I'll try to remember to update here.

Chris
Rene HernandezRene Hernandez
Hi Chris, thanks for the reply.  Its good to know that we are not the only one experiencing this issue. I'll keep you posted if I hear of anything.