Curl timeout is not set in 4.x version

Created on 16 April 2019, over 6 years ago
Updated 18 August 2025, 2 months ago

Our site experienced a hang yesterday that seems to be due to a curl request to avatax that never completed. Looking at the code for the 4.x branch, CURLOPT_CONNECTTIMEOUT is set to establish the maximum time establishing a connection can take, but CURLOPT_TIMEOUT is not set which would establish the maximum time a request can take to complete. The default value for CURLOPT_TIMEOUT is zero, or no timeout.

http://altafphp.blogspot.com/2012/12/difference-between-curloptconnecttimeou.html

Attaching a patch that will match the curl timeouts of the 4.x version to the 5.x version, where both CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT are set.

πŸ› Bug report
Status

Closed: outdated

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ajm8372

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024