• I had an instance where my site slowed to a halt and it was the Shareaholic plugin:

    • curl_multi_exec() /www/wp-content/plugins/shareaholic/lib/social-share-counts/curl_multi_share_count.php:71
    • get_counts() /www/wp-content/plugins/shareaholic/public.php:444

    In reviewing that code, I see a timeout set, but not a catch in the event the remote site can not be reached nor resolved. I think a try catch would improve this and handle the error more gracefully. I also noticed that you’re utilizing CURL when WordPress has its own API method:

    wp_remote_post()

    Really love this plugin, otherwise.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there!

    Thank you for using the Shareaholic plugin! As one of the developers of the plugin, I can tell you that we are using curl specifically to do curl_multi operations. If a website has curl with curl_multi enabled, we make concurrent share count requests and cache them. Otherwise, when curl is not installed, it will use wp_remote_request and do the share count requests sequentially.

    In the curl operation, we use curl_errno to see if an error occurred and that should be enough to catch any HTTP errors. I am surprised that you are seeing an uncaught error. Can you give us more details about this error (what the exact PHP error message is)? Thanks!

    Thread Starter douglaskarr

    (@douglaskarr)

    I listed the PHP error messages above directly from the log. The page was a 504 error.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Timeouts slow site’ is closed to new replies.