Opened 4 years ago
Last modified 12 months ago
#56688 new defect (bug)
Uncaught Requests_Exception using Requests::request_multiple
| Reported by: | clutch2sft | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | HTTP API | Version: | 6.0.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | performance |
Description (last modified by )
If a remote website does not respond to a request in Requests::request_multiple then CURL timeout is unhandled in the process.
PHP Fatal error: Uncaught Requests_Exception: cURL error 28: Operation timed out after 10001 milliseconds with 0 out of 0 bytes received in /.../wp-includes/Requests/Transport/cURL.php:443
Stack trace:
#0 /.../wp-includes/Requests/Transport/cURL.php(179): Requests_Transport_cURL->process_response('', Array)
#1 /.../wp-includes/class-requests.php(381): Requests_Transport_cURL->request('https://api.dyn...', Array, NULL, Array)
#2 /.../wp-includes/class-requests.php(233): Requests::request('https://api.dyn...', Array, NULL, 'GET', Array)
#3 /.../wp-content/plugins/tg-dynamic-dns-updater/public/class-tg-dynamic-dns-updater-public.php(149): Requests::get('https://api.dyn...', Array)
#4 /.../wp-content/plugins/tg-dynamic-dns-updater/public/class-tg-dynamic-dns-updater-public.php(131): Tg_Dynamic_Dns_Updater_Public->tg_get_bearer_token('70f4>
#5 /.../wp-includes/class-wp-hook.php(307): Tg_Dynamic_Dns_Updater_Public->tg_post_dynamic_dns('RHMgWcS1V5ybPtY...')
#6 /.../wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
#7 /.../wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#8 /.../wp-content/plugins/tg-dynamic-dns-updater/includes/class-tg-dynamic-dns-updater-async-api-task.php(34): do_action('wp_async_tg_inv...', 'RHMgWcS1V5ybPt>
#9 /.../wp-content/plugins/tg-dynamic-dns-updater/includes/wp-async-task.php(164): tg_async_dns_api_task->run_action()
#10 /.../wp-includes/class-wp-hook.php(307): WP_Async_Task->handle_postback('')
#11 /.../wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
#12 /.../wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#13 /.../wp-admin/admin-post.php(85): do_action('admin_post_wp_a...')
#14 {main}
To reproduce simply add non-responsive url to the requests array or reduce the timeout value to an unreasonable value to force a CURL timeout.
This issue is a bit beyond my understanding but has to do with the hook system calling other functions where the timeout occurs as best I can tell.... this creates a fault where it can't be caught by the calling code.
I also admit to not knowing what "Component" this belongs to.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi and welcome to WordPress Core Trac!
Requests is an external library. If this error still occurs, you may need to report it on the GitHub repository.
https://github.com/WordPress/Requests/issues?q=is%3Aissue%20state%3Aopen%20curl