Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1055869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:37:50+00:00 2026-05-16T17:37:50+00:00

Salesforce can send up to 100 requests inside 1 SOAP message. While sending this

  • 0

Salesforce can send up to 100 requests inside 1 SOAP message. While sending this type of Bulk Ooutbound message request my PHP script finishes executing but SF fails to accept the ACK used to clear the message queue on the Salesforce side of things. Looking at the Outbound message log (monitoring) I see all the messages in a pending state with the Delivery Failure Reason “java.net.SocketTimeoutException: Read timed out”. If my script has finished execution, why do I get this error?

I have tried these methods to increase the execution time on my server as I have no access on the Salesforce side:

  • set_time_limit(0); // in the script
  • max_execution_time = 360 ; Maximum execution time of each script, in seconds
  • max_input_time = 360 ; Maximum amount of time each script may spend parsing request data
  • memory_limit = 32M ; Maximum amount of memory a script may consume

I used the high settings just for testing.

Any thoughts as to why this is failing the ACK delivery back to Salesforce?

Here is some of the code:
This is how I accept and send the ACK file for the imcoming SOAP request

$data = 'php://input';
$content = file_get_contents($data);

if($content) {
    respond('true');
} else {
    respond('false');
}

The respond function

function respond($tf) {
    $ACK = <<<ACK
<?xml version = "1.0" encoding = "utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <notifications xmlns="http://soap.sforce.com/2005/09/outbound">
            <Ack>$tf</Ack>
        </notifications>
    </soapenv:Body>
</soapenv:Envelope>
ACK;

    print trim($ACK); 
}

These are in a generic script that I include into the script that uses the data for a specific workflow. I can process about 25 requests (That are in 1 SOAP response) but once I go over that I get the timeout error in the Salesforce queue. for 50 requests is usually takes my PHP script 86.77 seconds.

Could it be Apache? PHP?

I have also tested just accepting the 100 request SOAP response and just accepting and sending the ACK the queue clears out, so I know it’s on my side of things.

I show no errors in the apache log, the script runs fine.

I did find some info on the Salesforce site but still no luck. Here is the link.

Also I’m using the PHP Toolkit 11 (From Salesforce).

Other forum with good SF help

Thanks for any insight into this,
–Phill

UPDATE:

If I receive the incoming message and print the response, should this happen first regardless if I do anything else after? Or does it wait for my process to finish and then print the response?

UPDATE #2:

okay I think I have the problem:
PHP uses the single thread processing approach and will not send back the ACK file until the thread has completed it’s processing. Is there a way to make this a mutli thread process?
Thread #1 – accept the incoming SOAP request and send back the ACK
Thread #2 – Process the SOAP request

I know I could break it up into like a DB table or flat file, but is there a way to accomplish this without doing that?

I’m going to try to close the socket after the ACK submission and continue the processing, cross my fingers it will work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:37:50+00:00Added an answer on May 16, 2026 at 5:37 pm

    So what I’ve done is:

    1. Accept all incoming OBM’s, parse them into a DB
    2. When this is done kick of a process that runs in the background (Actually I send it to the background so the script can end)
    3. Send ACK file back

    By just accepting the raw data, parsing into fields and inserting it into a DB is fairly quick. Then I issue a Linux Command Line command that also send the processing script to run in the background. Then I send the ACK file to SF and the script ends within the allotted time. It is cumbersome to split the script process into two separate stages but it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.