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
Nathanael PadgettNathanael Padgett 

Salesforce API: connection was forcibly closed

We are calling Salesforce's API via PHP on several servers and starting on Wednesday evening (June 15, 2022), those API calls started randomly failing. These scripts have been working for many months (some for years). This is happening not just on our network, I have tested it running on a laptop at a different location entirely separate from our network and requests are still randomly failing. I've seen 50 successes in a row, with some having a 40 second connection attempt (a normal request should take 1-3 seconds), but still succeeding and I've seen it fail two out of every five attempts; and everything inbetween. I've submitted a case but it was cast off as a developer issue several times by SF "support" (LOL). Below are examples of the PHP messages received.

PHP Notice:  SoapClient::__doRequest(): Send of 962 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host in C:\SCRIPT_PATH\soapclient\SforceBaseClient.php on line 514

The SOAP API gives me back the following error text:
• Could not connect to host
• Failed Sending HTTP SOAP request
• Maximum execution time of 300 seconds exceeded
SwethaSwetha (Salesforce Developers) 
HI Nathanael ,
Are you seeing this behavior with a third-party tool like SOAP UI too? Based on this we can isolate if it is an issue with salesforce.

Related: https://stackoverflow.com/questions/26962608/php-function-shuts-down-on-soapclient-dorequest-connection-timeout
 Thanks
veniora12 joeveniora12 joe
To access the latest version of the Salesforce API you must modify the version ... An existing connection was forcibly closed by the remote host. https://tractorsinfo.net/myenvoyair-login/