WordPress.org

Ready to get started?Download WordPress

Forums

Contact-Form-7: 3rd-Party Integration
CF7-3rdParty Integration Failure (3 posts)

  1. itailulu
    Member
    Posted 1 year ago #

    I'm sometimes getting this error email back from my custom made service integration:

    There was an error when trying to integrate with the 3rd party service {Service 1} (http://www.site-url.com/my-integration.php).

    the error message comes with this:

    **RAW RESPONSE**
    Array
    (
        [safe_message] => error object
        [object] => WP_Error Object
            (
                [errors] => Array
                    (
                        [http_request_failed] => Array
                            (
                                [0] => Operation timed out after 10000 milliseconds with 0 bytes received
                            )
    
                    )
    
                [error_data] => Array
                    (
                    )
    
            )
    
    )

    This means that wp_remote_post() didn't retrieved anything in those 10 seconds.

    However, I can still see the data posted to the integrated service!

    What should I do to debug this?

    http://wordpress.org/extend/plugins/contact-form-7-3rd-party-integration/

  2. itailulu
    Member
    Posted 1 year ago #

    Update:
    I think this happens when a lot of users are submitting forms on the same time. Multiple instances of the script are running, and that's causing it to respond slower than the 10s timeout.

    What is the best way to tackle this? I can think of these two ways:

    1. Increase the timeout
    2. Create a queue (which I have no idea how to implement)

    What do you think?

  3. zaus
    Member
    Plugin Author

    Posted 10 months ago #

    Timeout setting is available in the "newer version" of this plugin http://wordpress.org/plugins/forms-3rdparty-integration/

    You could create a queue using Transients and wp_cron, maybe?
    * http://codex.wordpress.org/Transients_API
    * http://codex.wordpress.org/Function_Reference/wp_cron

    You would have to add items to the queue using the failure hook Forms3rdpartyIntegration_remote_failure (newer plugin) to examine the response for 'timeout' errors and create transients/schedule cron.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic