App error operation timed out after 59001 milliseconds with 0 out of 1 bytes received

Hi, Recently we keep facing this timeout error. Any guide what is the causes and how we can prevent this? Laravel Framework version 5.2.45 ably/ably-php-laravel": "^1.0" Laravel Log:...

Hi,

Recently we keep facing this timeout error. Any guide what is the causes and how we can prevent this?

Laravel Framework version 5.2.45
ably/ably-php-laravel»: «^1.0»

Laravel Log:

local.ERROR: exception ‘AblyExceptionsAblyRequestException’ with message ‘cURL error: Operation timed out after 10001 milliseconds with 0 out of -1 bytes received’ in /var/www/html/www-data/animategame/vendor/ably/ably-php/src/Http.php:150
Stack trace:
#0 /var/www/html/www-data/animategame/vendor/ably/ably-php/src/AblyRest.php(224): AblyHttp->request(‘POST’, ‘https://e.ably-…’, Array, ‘{«data»:»{«upd…’)
#1 /var/www/html/www-data/animategame/vendor/ably/ably-php/src/AblyRest.php(229): AblyAblyRest->requestWithFallback(‘POST’, ‘/channels/unive…’, Array, ‘{«data»:»{«upd…’, 3)
#2 /var/www/html/www-data/animategame/vendor/ably/ably-php/src/AblyRest.php(229): AblyAblyRest->requestWithFallback(‘POST’, ‘/channels/unive…’, Array, ‘{«data»:»{«upd…’, 2)
#3 /var/www/html/www-data/animategame/vendor/ably/ably-php/src/AblyRest.php(229): AblyAblyRest->requestWithFallback(‘POST’, ‘/channels/unive…’, Array, ‘{«data»:»{«upd…’, 1)
#4 /var/www/html/www-data/animategame/vendor/ably/ably-php/src/AblyRest.php(143): AblyAblyRest->requestWithFallback(‘POST’, ‘/channels/unive…’, Array, ‘{«data»:»{«upd…’)
#5 /var/www/html/www-data/animategame/vendor/ably/ably-php/src/AblyRest.php(114): AblyAblyRest->requestInternal(‘POST’, ‘/channels/unive…’, Array, ‘{«data»:»{«upd…’, false, true)
#6 /var/www/html/www-data/animategame/vendor/ably/ably-php/src/Channel.php(104): AblyAblyRest->post(‘/channels/unive…’, Array, ‘{«data»:»{«upd…’)
#7 /var/www/html/www-data/animategame/app/Http/Controllers/Admin/GameController.php(794): AblyChannel->publish(‘update-market’, Array)
#8 /var/www/html/www-data/animategame/vendor/laravel/framework/src/Illuminate/Database/Connection.php(543): AppHttpControllersAdminGameController->AppHttpControllersAdmin{closure}(Object(IlluminateDatabaseMySqlConnection))
#9 [internal function]: IlluminateDatabaseConnection->transaction(Object(Closure))
#10 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(11804): call_user_func_array(Array, Array)
#11 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(6325): IlluminateDatabaseDatabaseManager->__call(‘transaction’, Array)
#12 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(6325): IlluminateDatabaseDatabaseManager->transaction(Object(Closure))
#13 /var/www/html/www-data/animategame/app/Http/Controllers/Admin/GameController.php(800): IlluminateSupportFacadesFacade::__callStatic(‘transaction’, Array)
#14 /var/www/html/www-data/animategame/app/Http/Controllers/Admin/GameController.php(800): IlluminateSupportFacadesDB::transaction(Object(Closure))
#15 [internal function]: AppHttpControllersAdminGameController->ajaxUpdateUniversalAllManualOddMatch()
#16 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9424): call_user_func_array(Array, Array)
#17 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9486): IlluminateRoutingController->callAction(‘ajaxUpdateUnive…’, Array)
#18 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9466): IlluminateRoutingControllerDispatcher->call(Object(AppHttpControllersAdminGameController), Object(IlluminateRoutingRoute), ‘ajaxUpdateUnive…’)
#19 [internal function]: IlluminateRoutingControllerDispatcher->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#20 /var/www/html/www-data/animategame/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#21 [internal function]: IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#22 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9948): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#23 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9467): IlluminatePipelinePipeline->then(Object(Closure))
#24 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9454): IlluminateRoutingControllerDispatcher->callWithinStack(Object(AppHttpControllersAdminGameController), Object(IlluminateRoutingRoute), Object(IlluminateHttpRequest), ‘ajaxUpdateUnive…’)
#25 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(8524): IlluminateRoutingControllerDispatcher->dispatch(Object(IlluminateRoutingRoute), Object(IlluminateHttpRequest), ‘AppHttpContro…’, ‘ajaxUpdateUnive…’)
#26 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(8511): IlluminateRoutingRoute->runController(Object(IlluminateHttpRequest))
#27 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(8225): IlluminateRoutingRoute->run(Object(IlluminateHttpRequest))
#28 [internal function]: IlluminateRoutingRouter->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#29 /var/www/html/www-data/animategame/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#30 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(13474): IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#31 [internal function]: IlluminateViewMiddlewareShareErrorsFromSession->handle(Object(IlluminateHttpRequest), Object(Closure))
#32 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9963): call_user_func_array(Array, Array)
#33 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest))
#34 /var/www/html/www-data/animategame/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#35 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(11964): IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#36 [internal function]: IlluminateSessionMiddlewareStartSession->handle(Object(IlluminateHttpRequest), Object(Closure))
#37 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9963): call_user_func_array(Array, Array)
#38 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest))
#39 /var/www/html/www-data/animategame/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#40 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(13213): IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#41 [internal function]: IlluminateCookieMiddlewareAddQueuedCookiesToResponse->handle(Object(IlluminateHttpRequest), Object(Closure))
#42 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9963): call_user_func_array(Array, Array)
#43 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest))
#44 /var/www/html/www-data/animategame/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#45 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(13150): IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#46 [internal function]: IlluminateCookieMiddlewareEncryptCookies->handle(Object(IlluminateHttpRequest), Object(Closure))
#47 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9963): call_user_func_array(Array, Array)
#48 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest))
#49 /var/www/html/www-data/animategame/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#50 [internal function]: IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#51 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9948): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#52 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(8226): IlluminatePipelinePipeline->then(Object(Closure))
#53 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(8217): IlluminateRoutingRouter->runRouteWithinStack(Object(IlluminateRoutingRoute), Object(IlluminateHttpRequest))
#54 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(8207): IlluminateRoutingRouter->dispatchToRoute(Object(IlluminateHttpRequest))
#55 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(2419): IlluminateRoutingRouter->dispatch(Object(IlluminateHttpRequest))
#56 [internal function]: IlluminateFoundationHttpKernel->IlluminateFoundationHttp{closure}(Object(IlluminateHttpRequest))
#57 /var/www/html/www-data/animategame/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#58 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(3286): IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#59 [internal function]: IlluminateFoundationHttpMiddlewareCheckForMaintenanceMode->handle(Object(IlluminateHttpRequest), Object(Closure))
#60 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9963): call_user_func_array(Array, Array)
#61 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest))
#62 /var/www/html/www-data/animategame/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#63 [internal function]: IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#64 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(9948): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#65 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(2366): IlluminatePipelinePipeline->then(Object(Closure))
#66 /var/www/html/www-data/animategame/bootstrap/cache/compiled.php(2350): IlluminateFoundationHttpKernel->sendRequestThroughRouter(Object(IlluminateHttpRequest))
#67 /var/www/html/www-data/animategame/public/index.php(54): IlluminateFoundationHttpKernel->handle(Object(IlluminateHttpRequest))
#68 {main}

Do you have an error that looks something like this in your log file? (This example is for a backup to Google Drive – but the pattern can occur with various other remote storage methods too).

5226.206 (9) ERROR: Google Drive upload error: Operation timed out after 60004 milliseconds with 0 bytes received (line: 117, file: /home/leehawki/public_html/wp-content/plugins/updraftplus/includes/Google/IO/Curl.php)

This means that there was no network connectivity to the remote storage provider. (In the example above, it is saying that after 60004 milliseconds (i.e. 60 seconds), 0 bytes (i.e. absolutely zero) of data had been transported).

In this case, if the error persists (i.e. it happens again on a fresh try), you will want to talk to your web hosting provider, and show them the log, so that they can investigate. It is theoretically possible that the remote storage provider is temporarily having an outage – but, if it persists, then it’s far more likely that the network problem is at your webserver’s end, rather than at (for example) Google’s.

Note that UpdraftPlus is engineered to re-try if there is a network problem. Network problems happen often enough. You should wait at least half an hour before reporting the problem to anyone, to make sure that it is not just a one-off glitch.

In some cases, the problem is that the webserver has enabled IPv6 networking on the webserver (more information – Wikipedia), but with a broken setup. With IPv4 still dominating Internet traffic, this problem can sometimes pass for a long time on a server without being spotted. This is one possible cause of the above error. In this case, for Google storage (i.e. Google Drive or Google Cloud), you can add this after the opening line of your wp-config.php file, in order to cause UpdraftPlus to use IPv4 only:

define(‘UPDRAFTPLUS_IPV4_ONLY’, true);

If this does resolve the issue, then you should definitely report this to your web hosting provider, so that they can fix the misconfiguration on their server, which is better than just working around it in UpdraftPlus.

Posted in: Troubleshooting

Содержание

  1. Как исправить ошибку cURL 28: время ожидания соединения истекло
  2. Curl error 28 operation timed out after 10001 milliseconds with 0 bytes received
  3. Problem in more detail
  4. Source of the problem
  5. Conclusion
  6. cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) #669
  7. Comments

Как исправить ошибку cURL 28: время ожидания соединения истекло

Приветствуем вас! Вы видите ошибку cURL 28: Превышено время ожидания соединения на вашем сайте WordPress? Ошибка cURL 28 — распространенная проблема WordPress REST API, которая может повлиять на производительность вашего веб-сайта и привести к его непредсказуемому поведению.

В этой статье мы покажем вам, как легко исправить проблему cURL error 28 на вашем веб-сайте WordPress.

Что такое cURL в WordPress?

CURL — это программная утилита, используемая WordPress и многими другими веб-приложениями для отправки и получения запросов данных с использованием URL-адресов.

WordPress использует cURL для обработки нескольких запросов API. Он доступен как расширение языка программирования PHP, и ваша хостинговая компания WordPress позаботится об этом.

Библиотека cURL играет решающую роль в том, как WordPress работает за кулисами. Если он не настроен должным образом, ваш веб-сайт не будет работать должным образом.

Что вызывает ошибку cURL 28 в WordPress?

Неспособность своевременно ответить на запросы данных сервера вызывает ошибку 28 cURL в WordPress.

WordPress использует REST API (метод программирования) для отправки и получения запросов данных. Если время ожидания этих запросов истекло, вы увидите это как критическую проблему в отчете о работоспособности сайта с заголовком «Ошибка REST API» .

Расширение ошибки покажет вам дополнительную информацию, включая сообщение об ошибке:

Error: cURL error 28: Operation timed out after x milliseconds with x bytes received (http_request_failed)

Вы также можете увидеть другую связанную проблему с заголовком «Ваш сайт не может выполнить запрос обратной связи» . В нем будет аналогичное сообщение об ошибке со следующим описанием.

«Запрос обратной связи к вашему сайту не удался, это означает, что функции, использующие их, в настоящее время не работают должным образом».

Что может вызвать тайм-аут cURL?

Ряд сценариев может вызвать тайм-аут cURL в WordPress:

  • Например, плагин брандмауэра WordPress может блокировать запрос REST API, считая его подозрительным действием.
  • Если ваш DNS-сервер работает некорректно, это также может вызвать сбой HTTP-запросов и вызвать ошибку тайм-аута cURL в WordPress.
  • Плохо настроенный хостинг-сервер может просто иметь очень низкий порог тайм-аута, что может помешать правильной работе определенных процессов WordPress.

Давайте посмотрим, как устранить и исправить данную проблему.

1. Временно отключите брандмауэр WordPress

Если вы используете брандмауэр WordPress или плагин безопасности, временно отключите его.

После этого вам нужно посетить страницу отчета о работоспособности сайта WordPress, чтобы узнать, решена ли ваша проблема.

Если да, то вам нужно проверить журналы брандмауэра WordPress, чтобы узнать, какие запросы API были заблокированы. Это либо определит источник проблемы, либо вы можете настроить параметры брандмауэра, чтобы не блокировать законные запросы API.

2. Отключите все плагины WordPress

Плагины WordPress создают собственные запросы API для отправки и получения данных. Если эти вызовы слишком часты или для выполнения требуется слишком много времени, это может вызвать ошибку cURL в отчете о работоспособности вашего сайта.

Самый простой способ выяснить это — отключить все плагины WordPress. Просто перейдите на страницу «Плагины»-«Установленные» и выберите все плагины.

После этого щелкните раскрывающееся меню «Массовые действия» , чтобы выбрать «Деактивировать» , а затем нажмите кнопку «Применить» .

Теперь вы можете посетить отчет о работоспособности сайта, чтобы узнать, исчезла ли проблема. Если это устранило проблему, вы можете активировать свои плагины один за другим, пока проблема не появится снова.

Это поможет вам найти плагин, который может вызывать проблему.

3. Убедитесь, что ваш хостинг-сервер использует новейшее программное обеспечение

Следующий шаг — убедиться, что ваш хостинг-сервер WordPress использует последние версии PHP, библиотеки cURL и OpenSSL.

Вы можете проверить это, просмотрев вкладку системной информации на странице «Инструменты»-«Здоровье сайта» .

Просто перейдите на вкладку «Информация» и разверните раздел «Сервер» . Отсюда вы можете получить информацию о программном обеспечении, установленном на вашем хостинг-сервере WordPress.

В идеале ваш сервер должен использовать PHP 7.4.13 или выше, curl 7.74.0 или выше и OpenSSL 1.1.1 или выше.

Если это не так, вам необходимо связаться с вашей хостинговой компанией и попросить их обновить программное обеспечение для вашей учетной записи хостинга.

4. Устранение проблем с небезопасным контентом SSL

Если ваш сайт использует HTTPS / SSL, но он не настроен должным образом, это также может привести к тому, что ваш веб-сервер заблокирует небезопасные запросы cURL.

Точно так же, если ваш веб-сайт не использует HTTPS / SSL, но он сделал вызов API с использованием URL-адреса HTTP, то эти запросы тоже не будут выполнены, и вместо этого вы можете увидеть следующую ошибку cURL:

Ошибка: ошибка cURL 7: не удалось подключиться к порту localhost 443: в соединении отказано (http_request_failed)

Чтобы исправить это, вы можете попросить своего хостинг-провайдера переустановить сертификат SSL для вашего сайта.

5. Обратитесь за помощью к поставщику услуг хостинга

Если описанные выше действия не помогли устранить ошибку cURL 28 то, проблема, скорее всего, связана с средой хостинга.

Есть много факторов, которые могут контролироваться и исправляться только вашей хостинговой компанией. Например, если их DNS-серверы не могут своевременно разрешать запросы, это приведет к тайм-ауту запросов cURL.

Другой сценарий может заключаться в более медленном подключении или сетевых проблемах с вашим хост-сервером.

Просто отправьте им запрос в службу поддержки с подробными сведениями об ошибке, и их технический персонал сможет устранить неполадки и применить исправление для ее решения. Ну что, у нас на этом все. Всем пока!

Источник

Curl error 28 operation timed out after 10001 milliseconds with 0 bytes received

Updated: May 4, 2020

Recently, I discovered an interesting little problem. I run WordPress on my books-only website, and naturally, there’s testing that needs to be done to make sure everything is hunky-dory ere any changes are introduced to the domain. One such change was the introduction of the Site Health check tool in WordPress 5.2, which tells you of any critical issues and recommended actions for your setup.

On its own, this is fine, but then I noticed a couple of supposedly critical errors showing up with update to 5.4, indicating a sudden new issue with the domain. The errors were: The REST API encountered an error and Your site could not complete a loopback request. The details for both these read: Error: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (http_request_failed). Weird. Let’s debug.

Problem in more detail

Critical issues sound alarming. But then, you need to look at potential problems carefully, to understand what the actual impact is. Quite often, companies are over-stringent with how they treat bugs and problems, because no one wants to be accused of being too lax with issues that could lead to security complications. So let’s have a look at the status report:

The first issue reads as follows:

The REST API encountered an error

The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.

The REST API request failed due to an error.
Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)

The second one has the following text:

Your site could not complete a loopback request

Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.

The loopback request to your site failed, this means features relying on them are not currently working as expected.
Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)

The first error tells us that this is one way WordPress uses to communicate with the server — this means there are other ways. The error isn’t explicit in whether this will actually cause possible issues when performing various operations.

It does specifically mention the block editor — the whole new Gutenberg thingie introduced in WordPress 5.0, which I do not use, and instead rely on the awesome Classic Editor. So maybe this is a non-issue to begin with. Then, there’s the question of actual functionality — none of the mentioned functions are affected. WordPress works and does everything as it should. Perhaps a false positive? We shall see soon.

The second error talks about scheduled events — like background updates, overnight tasks, etc. Again, if you have none configured, this is a non-issue. If you do, and they run correctly, then the problem does not affect you. The error does say «working as expected» — but this is not a very deterministic, precise statement. It makes troubleshooting more difficult.

Source of the problem

But let’s assume for a moment that these are actually real problems. The question is, how do you troubleshoot where they stem from? Not an easy thing, and there’s nothing in the actual error messages that can steer you in the right direction.

So what I had to do was manually turn off every single non-default component, one by one, and then re-run the health check, to see whether any one particular element was at fault. Luckily, I could test this at leisure, but imagine the impact in a production setup.

Now . after a while, I had tried every single plugin and theme that I was using, and none of these seemed to affect the outcome. WordPress continued complaining. Then, I decided to expand my search. I happen to be using an .htaccess file, with basic authentication and a few other useful details, as a secondary layer of access control to the admin page. Lo and behold, removing the auth part fixed it. No more health check errors!

AuthType Basic
AuthName restricted
AuthUserFile /home/mastablasta/wp-admin/passwd
Require valid-user

So it would seem — WordPress Site Health does not like .htaccess files. I haven’t explored exactly how this trips the checks, but then, I do not need to. One, I know what the source of the problem is. Two, the errors do not affect the functionality that I want and need, hence this is a non-issue.

Conclusion

It is obvious that the problems in Site Health are internal — after all, they only started cropping up with the move to WordPress 5.4. Of course, some piece of code somewhere has changed, but then, essentially, if a core product behavior is suddenly radically different than it was just before the update, and there are no huge problems in the other elements of the site’s functionality, then it’s quite likely the issue stems from said core product update.

I do like the idea of this site-issues-at-a-glance kind of thing, but I am not happy with the false positives, or the goose chase that the errors have created for me, even if only briefly. Errors need to be meaningful. If I have no insight what might be wrong from the way the error manifests, then there’s really no point showing the technical details. The cURL error 28 and .htaccess seem so far apart. Anyway, here we are. If you’re affected by a similar problem, have a look at your site configuration, see if you’re using basic auth, and perhaps suffering from the same would-be bug. We’re done here.

Источник

cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) #669

I need to fetch all products from stores.
I write a code that fetches all products but sometimes I got the error: true and message:

cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

Why? And How to solve that problem?
Again, it happens sometimes not all the time.

The text was updated successfully, but these errors were encountered:

No, this could be a number of reasons this happens, but its not specific to the package, this is a network issue. You may need to pass custom Guzzle arguments to have a more verbose debug output show up.

Can you please help me? How to pass custom Guzzle arguments? How to increase timeout seconds?

Edit shopify-app.php config, look for api_init , and for the value you’d do something like:

Given this is a network issue, I will close for now unless there’s something concrete to point to this package or the underlying API package. Thanks!

I am facing this same issue on one of my installs. It basically tracks back to the Guzzle timeout being too short.

In «basic-shopify-api/src/Osiset/BasicShopifyAPI/Options.php» the «timeout» option in the GuzzleOptions is set to 10 seconds. This timeout just needs updating a little.

To test the theory, I have manually altered that file so the timeout is now 90 seconds, and the error disappears.

Not quite sure how to alter this for production, as the code listed above with the «api_init» had no impact.

For anyone facing this issue, a modified version of the code above seems to do the trick:

Hi, Thank you very much!

Where to put this code? In controller?

before class declare ?

Where to put this code? In controller?

before class declare ?

You put it in the config/shopify-app.php file. The imports go at the top, then search for ‘api_init’ and. update with the code above

@myw-ben Thank you for the solution. But while using this code with Laravel Jobs, it gives error,

Is there any other solution to increase the timeout?

@mitulgolakiya try creating a static function somewhere then doing something like this:
‘api_init’ => ‘AppProvidersAppServiceProvider::shopifyApiClosure’,

Источник

  1. Home

  2. php — Getting error Operation timed out after 100096 milliseconds with 0 out of -1 bytes received

270 votes

0 answers

Get the solution ↓↓↓

I am trying to use youtube api to upload video from my website to other in laravel for which i am using fbf/youtube package of laravel.
But i am getting the error

Operation timed out after 100096 milliseconds with 0 out of -1 bytes
received

What could be the problem.

2022-05-4

Write your answer


Share solution ↓

Additional Information:

Date the issue was resolved:

2022-05-4

Link To Source

Link To Answer
People are also looking for solutions of the problem: cannot access offset of type string on string

Didn’t find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.


Similar questions

Find the answer in similar questions on our website.

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.


About the technologies asked in this question

PHP

PHP (from the English Hypertext Preprocessor — hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/

Laravel

Laravel is a free open source PHP framework that came out in 2011. Since then, it has been able to become the framework of choice for web developers. One of the main reasons for this is that Laravel makes it easier, faster, and safer to develop complex web applications than any other framework.
https://laravel.com/



Welcome to programmierfrage.com

programmierfrage.com is a question and answer site for professional web developers, programming enthusiasts and website builders. Site created and operated by the community. Together with you, we create a free library of detailed answers to any question on programming, web development, website creation and website administration.

Get answers to specific questions

Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.

Help Others Solve Their Issues

Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.


  Public Ticket #2705948

Error cURL error 28: Operation timed out after 5001 milliseconds with 0 out of -1 bytes received


Closed

Comments

  • IW started the conversation

    hi I’m getting the following message when I try to load a table linked to Google Sheets

    Error

    cURL error 28: Operation timed out after 5001 milliseconds with 0 out of -1 bytes received

    This didn’t happen before I used the option of link google sheet API to my wpdatatable to google sheet. Back then I just published my google spreadsheet to get a link for wpdatatalbe. I like the API feature because it allows me to protect my google sheet data, but this seems to cause this problem. 

    I heard from someone that the curl time needs to be extended in the code. Is that something wpdatatable can do? thank you.

  •  2,315

    Aleksandar replied

    Hello IW

    Can you check first do you have some errors in your Inspect element->Console of the browser? If you do please share with us.

    Then how you create this table? Are you connect to Google Sheet API over Section account like is explained here?

    if the answer is no, then you just create a table with old logic like is describe on this link.

    Recently Googe changes the functionality of how you can access google sheet data so you also need to share that sheet with everyone to be accessible like is explained on this link.

    That old logic has one timeout set here wp-content/plugins/wpdatatables/source/class.wdttools.php around line 198

    you will find this

    $timeout = 5;

    and you can try to increase it to 50 and check again.

    Also please send us that Google Spreadsheet link that you use for those tables so we can test it in our local environment.

  • IW replied

    hi Aleksandar, thanks for your kind reply. I was unable to reply until now. I hope you understand. 

    I tried increasing the timelimit to 50 in class.wdttools.php, but I still have the same problem. (what I find odd is that wpdatatables still says operation timed out after 5001 milliseconds, even though I changed 5 to 50. Shouldn’t it say «50001» milliseconds? Could this be because it takes time for the changed php file to be reflected?)

    By the way, yes I connected the wpdatatable to my google sheets via Google Sheet API.

    Does Google require that my sheets be public to everyone in such a case? At the moment, I have made my sheets private only to me and wpdatatable. Should I make it public and send you the link?

    Thank you

  •  2,315

    Aleksandar replied

    Hello again IW

    After exploring this issue further, we found that the Google Sheets API has a quota limit. It’s limited to 500 requests per 100 seconds per project, and 100 requests per 100 seconds per user.

    https://developers.google.com/sheets/api/limits

    That quota can be increased, but that requires an additional charge in Google (increasing the quota is not free). Another way would be to use the old method without the API. 

    Our developers are working on this, and we’ll try to come up with a better solution for one of our updates, without the need to pay Google for increasing the quota.

  • IW replied

    Hi, Aleksandar, 

    I’m still struggling with this error and was wondering if you had any update on the efforts to increase the limit without additional pay to Google. Also would you be able to point me to some guide or instructions on the non-API «old method» that can prevent the timeout error? Thank you.

  •  2,315

    Aleksandar replied

    Hi again, IW

    I just spoke with our lead developer, and unfortunately, there’s no solution for this yet.

    You would be able to use the old method, you’d simply need to click on «Remove account» in wpDataTables settings/Google Spreadsheet API settings, and that’s it.

    However, if this is a private spreadsheet (not published to the web), it will not work, and also you will face the same issues with the cache on Google’s side — up to 15 minutes before the data is updated in wpDataTables.

  •  2
  •  2,315

    Aleksandar replied

    Hey Miroslav

    1. This is when you’re using the API method:

    As for the Stack Overflow thread — we’re not using the client, but direct API links.

    What we are doing is passing Google sheet API URL with parameters from your Google sheets URL in a format like https://sheets.googleapis.com/v4/spreadsheets/… to the WordPress built-in function 

    wp_remote_get

    that performs an HTTP request using the GET method and returns its response.

    Like I said in the previous post if you test your file (you can create the same sheet with dummy data) and test it on our sandbox link that is also provided in the previous post you will see that tables are created without any issues with or without new Google sheet API connection.

    If you get this error because of the WordPress hook that we provide in some of the previous posts

    __extend_http_request_timeout

    you need to remove it from your functions.php file and then checkout solutions for the first initial error for curl error 28 — Operation timed out …

    https://www.wpbeginner.com/wp-tutorials/how-to-fix-curl-error-28-connection-timed-out-after-x-milliseconds/

    2. If you’re not using the API method, but the old method:

    That old logic has one timeout set here wp-content/plugins/wpdatatables/source/class.wdttools.php around line 198

    you will find this (if you have the latest version of wpDataTables (3.6))

    $timeout = 25;

    and you can try to increase it to 100 and check again.

    If you have the older version of wpDataTables, the timeout is set to «5», not «25».

ochibka-v-wordpress-001Приветствуем вас! Вы видите ошибку cURL 28: Превышено время ожидания соединения на вашем сайте WordPress? Ошибка cURL 28 — распространенная проблема WordPress REST API, которая может повлиять на производительность вашего веб-сайта и привести к его непредсказуемому поведению.

В этой статье мы покажем вам, как легко исправить проблему cURL error 28 на вашем веб-сайте WordPress.

Что такое cURL в WordPress?

CURL — это программная утилита, используемая WordPress и многими другими веб-приложениями для отправки и получения запросов данных с использованием URL-адресов.

WordPress использует cURL для обработки нескольких запросов API. Он доступен как расширение языка программирования PHP, и ваша хостинговая компания WordPress позаботится об этом.

Библиотека cURL играет решающую роль в том, как WordPress работает за кулисами. Если он не настроен должным образом, ваш веб-сайт не будет работать должным образом.

Что вызывает ошибку cURL 28 в WordPress?

Неспособность своевременно ответить на запросы данных сервера вызывает ошибку 28 cURL в WordPress.

WordPress использует REST API (метод программирования) для отправки и получения запросов данных. Если время ожидания этих запросов истекло, вы увидите это как критическую проблему в отчете о работоспособности сайта с заголовком «Ошибка REST API».

Расширение ошибки покажет вам дополнительную информацию, включая сообщение об ошибке:

Error: cURL error 28: Operation timed out after x milliseconds with x bytes received (http_request_failed)

Вы также можете увидеть другую связанную проблему с заголовком «Ваш сайт не может выполнить запрос обратной связи». В нем будет аналогичное сообщение об ошибке со следующим описанием.

«Запрос обратной связи к вашему сайту не удался, это означает, что функции, использующие их, в настоящее время не работают должным образом».

Что может вызвать тайм-аут cURL?

Ряд сценариев может вызвать тайм-аут cURL в WordPress:

  • Например, плагин брандмауэра WordPress может блокировать запрос REST API, считая его подозрительным действием.
  • Если ваш DNS-сервер работает некорректно, это также может вызвать сбой HTTP-запросов и вызвать ошибку тайм-аута cURL в WordPress.
  • Плохо настроенный хостинг-сервер может просто иметь очень низкий порог тайм-аута, что может помешать правильной работе определенных процессов WordPress.

Давайте посмотрим, как устранить и исправить данную проблему.

1. Временно отключите брандмауэр WordPress

Если вы используете брандмауэр WordPress или плагин безопасности, временно отключите его.

ochibka-v-wordpress-01

После этого вам нужно посетить страницу отчета о работоспособности сайта WordPress, чтобы узнать, решена ли ваша проблема.

Если да, то вам нужно проверить журналы брандмауэра WordPress, чтобы узнать, какие запросы API были заблокированы. Это либо определит источник проблемы, либо вы можете настроить параметры брандмауэра, чтобы не блокировать законные запросы API.

2. Отключите все плагины WordPress

Плагины WordPress создают собственные запросы API для отправки и получения данных. Если эти вызовы слишком часты или для выполнения требуется слишком много времени, это может вызвать ошибку cURL в отчете о работоспособности вашего сайта.

Самый простой способ выяснить это — отключить все плагины WordPress. Просто перейдите на страницу «Плагины»-«Установленные» и выберите все плагины.

ochibka-v-wordpress-02

После этого щелкните раскрывающееся меню «Массовые действия», чтобы выбрать «Деактивировать», а затем нажмите кнопку «Применить».

Теперь вы можете посетить отчет о работоспособности сайта, чтобы узнать, исчезла ли проблема. Если это устранило проблему, вы можете активировать свои плагины один за другим, пока проблема не появится снова.

Это поможет вам найти плагин, который может вызывать проблему.

3. Убедитесь, что ваш хостинг-сервер использует новейшее программное обеспечение

Следующий шаг — убедиться, что ваш хостинг-сервер WordPress использует последние версии PHP, библиотеки cURL и OpenSSL.

Вы можете проверить это, просмотрев вкладку системной информации на странице «Инструменты»-«Здоровье сайта».

ochibka-v-wordpress-03

Просто перейдите на вкладку «Информация» и разверните раздел «Сервер». Отсюда вы можете получить информацию о программном обеспечении, установленном на вашем хостинг-сервере WordPress.

ochibka-v-wordpress-04

В идеале ваш сервер должен использовать PHP 7.4.13 или выше, curl 7.74.0 или выше и OpenSSL 1.1.1 или выше.

Если это не так, вам необходимо связаться с вашей хостинговой компанией и попросить их обновить программное обеспечение для вашей учетной записи хостинга.

4. Устранение проблем с небезопасным контентом SSL

Если ваш сайт использует HTTPS / SSL, но он не настроен должным образом, это также может привести к тому, что ваш веб-сервер заблокирует небезопасные запросы cURL.

Точно так же, если ваш веб-сайт не использует HTTPS / SSL, но он сделал вызов API с использованием URL-адреса HTTP, то эти запросы тоже не будут выполнены, и вместо этого вы можете увидеть следующую ошибку cURL:

Ошибка: ошибка cURL 7: не удалось подключиться к порту localhost 443: в соединении отказано (http_request_failed)

Чтобы исправить это, вы можете попросить своего хостинг-провайдера переустановить сертификат SSL для вашего сайта.

5. Обратитесь за помощью к поставщику услуг хостинга

Если описанные выше действия не помогли устранить ошибку cURL 28 то, проблема, скорее всего, связана с средой хостинга.

Есть много факторов, которые могут контролироваться и исправляться только вашей хостинговой компанией. Например, если их DNS-серверы не могут своевременно разрешать запросы, это приведет к тайм-ауту запросов cURL.

Другой сценарий может заключаться в более медленном подключении или сетевых проблемах с вашим хост-сервером.

Просто отправьте им запрос в службу поддержки с подробными сведениями об ошибке, и их технический персонал сможет устранить неполадки и применить исправление для ее решения. Ну что, у нас на этом все. Всем пока!

С уважением Вячеслав и Валерия!

Понравился материал? Поделитесь с друзьями!

Интересное на блоге

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner

4,467,582

Community Members

  • Community
  • Products
  • Sourcetree
  • Questions
  • Getting error as «operation timed out after 0 milliseconds with 0 out of 0 bytes received»

Divakar M P

Getting error as «operation timed out after 0 milliseconds with 0 out of 0 bytes received» during Push operation in sourcetree…

1 answer

Ana Retamal

Hi Divakar, can you provide some more information so we can troubleshoot this issue:

  1. If you try pushin using your terminal, do you get any error?
  2. Are you getting errors when performing different actions, like pull for example?
  3. Is this only happening with a certain repository or with all of them?
  4. Which version of SourceTree and OS are you using?

Regards!

Ana

You must be a registered user to add a comment. If you’ve already registered, sign in. Otherwise, register and sign in.

  • Comment

Suggest an answer

People on a hot air balloon lifted by Community discussions

Still have a question?

Get fast answers from people who know.

Was this helpful?

Thanks!

TAGS

Atlassian Community Events

  • FAQ
  • Community Guidelines
  • About
  • Privacy policy
  • Terms of use
  • © 2023 Atlassian

Понравилась статья? Поделить с друзьями:
  • App error failed to allocate memory men of war
  • App error define not found esdlreader cpp 367
  • App error 400
  • App error 200 blackberry
  • App blackberry error 523