100% Working Solution for php & nginx web server
Issue => net::ERR_INCOMPLETE_CHUNKED_ENCODING nginx
Step1 : Open /etc/php/7.2/fpm/pool.d [Select your php folder in my case i am using php 7.2]
Step2 : Edit www.conf file inside pool.d folder
In my case it’s look like this =>
[inet]
user = www-data
group = www-data
listen = 127.0.0.1:9999
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 5
pm.status_path = /status
ping.path = /ping
request_terminate_timeout = 10s
request_slowlog_timeout = 10s
;
; Log files
;
access.log = /var/log/php-fpm/php-fpm.log
slowlog = /var/log/php-fpm/slow.log
Step3 : Change the value of request_terminate_timeout = 10s (Whatever time you want)
request_terminate_timeout = 300s
Step4 : Now Save and restart php-fpm (in my case i am using php7.2 so cmd will be)
sudo service php7.2-fpm restart
Now you can execute your script it will works and will terminate after 300s
Now one more thing add one more line of syntax fastcgi_read_timeout 300; inside nginx.conf file or your website .conf file [Here is code ]
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/conf-enabled/*.conf;
include /etc/nginx/sites-enabled/*.conf;
}
After adding fastcgi_read_timeout 300; it will look like this
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/conf-enabled/*.conf;
include /etc/nginx/sites-enabled/*.conf;
fastcgi_read_timeout 300;
}
Now reload nginx and restart php-fpm by following cmd
sudo service php7.2-fpm reload
sudo service nginx reload
Note : The code snippet is run and tested bye me please let me know if you are not able to fix your issue via my answer
Содержание
- 4 Ways To Fix Err_incomplete_chunked_encoding in Chrome
- Disabling your Chrome extensions could help you fix this problem
- Why am I getting err_incomplete_chunked_encoding in Chrome?
- What does err_incomplete_chunked_encoding mean?
- Opera
- How do I fix err_incomplete_chunked_encoding in Chrome?
- 1. Disable prefetching in Google Chrome
- 2. Uninstall third-party antivirus software
- 3. Disable Chrome’s extensions
- 4. Reset Google Chrome
- Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
- The Fix (for me).
- ERR_INCOMPLETE_CHUNKED_ENCODING, когда тело запроса не читается
- Проблема фона
- Решение
- 4 Ways To Fix Err_incomplete_chunked_encoding in Chrome
- Disabling your Chrome extensions could help you fix this problem
- Why am I getting err_incomplete_chunked_encoding in Chrome?
- What does err_incomplete_chunked_encoding mean?
- Opera
- How do I fix err_incomplete_chunked_encoding in Chrome?
- 1. Disable prefetching in Google Chrome
- 2. Uninstall third-party antivirus software
- 3. Disable Chrome’s extensions
- 4. Reset Google Chrome
4 Ways To Fix Err_incomplete_chunked_encoding in Chrome
Disabling your Chrome extensions could help you fix this problem
- Website pages don’t load and CSS and JavaScript files get truncated when this annoying error arises in Google Chrome .
- This troubleshooting guide shows you the various steps you can use in order to efficiently fix the ERR_INCOMPLETE_CHUNKED_ENCODING issue easily.
- This error occurs when there is something wrong with your network, proxy, web browser, anti-virus software, as well as other causes.
Some users have posted on numerous forums about a Chrome ERR_INCOMPLETE_CHUNKED_ENCODING page-loading issue.
When that issue arises, website pages hang or don’t load correctly with Google Chrome displaying blank pages. JavaScript and CSS files also get truncated, which generates web form submission issues.
That issue typically arises for users utilizing Google Chrome within client/server network environments with Apache server software. Those users spot the ERR_INCOMPLETE_CHUNKED_ENCODING error message within Chrome’s developer console.
Why am I getting err_incomplete_chunked_encoding in Chrome?
We’re glad you asked this question and, as always, we’re here to provide an elaborate and trustworthy answer.
This error code is raised when the user doesn’t receive the final 0-length chunk of a chunked transfer. When it happens, website pages hang or fail to load correctly, and Google Chrome displays a blank page.
Furthermore, JavaScript and CSS files are also truncated, creating issues with the web form submission.
It’s important to understand that this problem usually occurs with users using Google Chrome in a client or server network environment with Apache server software.
What does err_incomplete_chunked_encoding mean?
It means that the process you were undergoing could no longer function due to a problem with your network, proxy, web browser, anti-virus software, or something like that which is breaking a network connection to your site.
Quick Tip:
It’s fairly usual to have problems with your browser, but that’s why there are alternatives. Because it may be some time until the Chrome issue is resolved, consider keeping a backup browser, such as Opera.
Most of the time, this great browser does not interfere with other applications, and the built-in proxy VPN may come in helpful in such conditions. Test Opera and see if you can make the switch.
Opera
The agony stops here, thanks to Chrome’s best alternative.
How do I fix err_incomplete_chunked_encoding in Chrome?
1. Disable prefetching in Google Chrome
- Open the Google Chrome browser the issue arises on.
- Click the Customize and Control Google Chrome menu button on the far right of the browser’s URL toolbar.
- Select Settings to open a tab that includes Chrome’s browser options.
- Click Cookies and other sitedata to open further options.
- Then scroll down to the Preload pages for faster browsing option shown directly below.
- Toggle the Preload pages option off if it’s on.
- Restart Chrome after turning off the Preload pages option.
2. Uninstall third-party antivirus software
- To uninstall a third-party antivirus utility in Windows, right-click the Start button and select Run.
- Type appwiz.cpl in Run’s text box, and press the Enter keyboard key.
- Next, select the antivirus utility listed within the uninstall program list.
- Click the Uninstall button to remove the antivirus software.
- Select Yes on the uninstall software confirmation prompts.
Users have specifically confirmed that the ERR_INCOMPLETE_CHUNKED_ENCODING error can arise due to Avast, Kaspersky, and ESET antivirus software. So, you should certainly uninstall those publishers’ antivirus software if you have any one of them installed.
To check if the ERR_INCOMPLETE_CHUNKED_ENCODING issue is due to your third-party antivirus software, try disabling its real-time protection first. If disabling its real-time protection fixes the issue, uninstall the antivirus software.
Many antivirus utilities have removal tools you can download that will more thoroughly remove them than Windows’ default uninstaller. The ESET site includes a handy index of removal tool links for the bigger antivirus software.
3. Disable Chrome’s extensions
- Click the Customize and Control Google Chrome button to open that browser’s menu.
- Click More Tools to open that submenu.
- Then select Extensions to open Chrome’s add-on tab.
- To turn off an extension, click its blue toggle button.
- Turn off all your Google Chrome extensions, and restart the browser.
4. Reset Google Chrome
- Open the Customize and Control Google Chrome menu at the top right of that browser’s window.
- Click Settings to open that tab in the browser.
- Scroll all the way down to the Advanced button on the Settings tab.
- Click Advanced to extend the options on the Settings tab.
- Then scroll further down to the Restore settings to their original defaults option.
- Click Restore settings to their original defaults to select that option.
- Press the Reset settings button to provide confirmation.
Now you have troubleshooting solutions for errors such as err_incomplete_chunked_encoding 200, or failed to load resource: net::err_incomplete_chunked_encoding.
Situations such as this aren’t to be taken lightly and immediate actions are required for err_incomplete_chunked_encoding chrome.
The issue can come in many forms, displaying messages such as err_incomplete_chunked_encoding 500, or maybe err_incomplete_chunked_encoding chrome jsp.
There are other potential fixes for the ERR_INCOMPLETE_CHUNKED_ENCODING error.
However, the above resolutions are confirmed fixes that have resolved the issue for many users.
Still having issues? Fix them with this tool:
Источник
Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
For the past few months, I’ve been having a problem with pages not loading properly in Chrome and Firefox. Here are some of the symptoms:
- Blank pages being displayed, despite the fact that the title of the web page is showing up in the tab.
- Sometimes, pressing refresh on a page doesn’t seem to do anything. i.e. The page won’t even reload – almost as if the request is being cancelled.
- Pages getting “stuck” half-way.
- A continuous “loading” icon in the browser tab that doesn’t seem to go away.
- JavaScript and CSS files being truncated, leading to display issues and annoying client-side errors (I spent 5 minutes trying to submit a simple web form, all because the Ajax code that handled the form was being truncated).
It is worth noting that Firefox has been exhibiting the same behavior. However, instead of displaying console errors, it has been silently truncating content (I discovered this after manually inspecting Ajax requests with the Firebug extension).
While attempting to debug the issue, I came across the following error in the console of Chrome’s developer tools section:
Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
Others have said that they were able to fix this issue by taking the following steps:
- Open up the settings page in Chrome.
- Scroll down until you see a link called “Show advanced settings…”
- Click on this and then find the section called “Privacy”.
- In this section, you will find an option called “Predict network actions to improve page load performance”.
- UNCHECK the checkbox and restart Chrome.
Make sure that you restart your browser before you check to see if this has worked. NB: This setting seems to revert to the default setting as soon as you clear your cache.
Unfortunately, the above “fix” did not work for me.
To get things working normally on my Apache / PHP server, I had to add the following to my .htaccess file:
Obviously, this is not a recommended fix, as it forces Apache to respond with HTTP/1.0 instead of HTTP/1.1 (HTTP/1.1 has a lot of advantages over 1.0). However, it was a useful temporary fix for my development machine.
The Fix (for me).
For me, the issue was being cause by the Real-time Protection feature on my ESET antivirus. Because the issue was only happening to me and nobody else, I figured that it had to be a client issue. In my attempt to solve this, I disabled my extensions, cleared Chrome’s cache and browsed the affected server in Incognito mode. I even changed my network card. Still, I kept getting the “ERR_INCOMPLETE_CHUNKED_ENCODING” error.
Finally, just as I was about to give up, I decided to disable the Real-time protection on my antivirus.
Источник
ERR_INCOMPLETE_CHUNKED_ENCODING, когда тело запроса не читается
Ниже приводится отчет о моем крестовом походе против интересной ошибки, хотя, хотя я решил, я не понимаю. Я нашел решение, но я действительно надеюсь, что кто-то может дать некоторое представление о фактической причине ошибки.
Проблема фона
Эта проблема впервые появилась на рабочем сервере нашего приложения Django. Стек выглядела следующим образом
Наша команда выявила проблему с одним запросом POST в Safari. Safari задохнется от ответа и выплюнет ERR_INCOMPLETE_CHUNKED_ENCODING . Запрос по почте был следующим:
Запрос – это простой запрос на пометку объекта как закрытого. Мы используем этот шаблон во многих местах сайта, поэтому этот вопрос, очевидно, требует внимания.
Решение
Наш первый ключ заключался в том, что запрос закрыл объект. То есть, линия if contract.submit() должна быть достигнута. Это сужает проблему до ответа. Я сделал некоторое чтение, и для этой ошибки существует множество причин. Мы попробовали:
- Явная установка длины содержимого в Django
- Некоторые хаки, которые заставили nginx получить более достоверную длину контента судьи
- Переписывание кода несколькими способами.
Ничего не работало, и проблема все еще никогда не происходила локально. Поэтому мы решили реплицировать весь стек локально и протестировать. По одному мы удалили элементы сетевого уровня и определили, что удаление nginx и прямое обращение к uWSGI решило проблему.
Итак, теперь мы уверены, что проблема заключается в nginx, но до сих пор не имеет решения. Ну, где-то на третьей странице Google, я столкнулся с сообщением StackOverflow, в котором был короткий комментарий, в котором упоминалось, что чтение тела запроса оказало какое-то влияние на буферы nginx и как он оценивает длину контента (это то, о чем я не знаком). Во всяком случае, по-видимому, решение проблем с этим – просто прочитать буфер. То есть использовать тело запроса. Поэтому я попробовал просто прикоснуться к телу запроса, присвоив его значение переменной:
- Обнаружен ERR_INCOMPLETE_CHUNKED_ENCODING при получении ответа на очень простой вызов
- Проблема произошла только в Safari в области окружающей среды
- Во время отладки мы удалили одну часть стека за раз и указали, что удаление nginx решит проблему.
- Запрос был POST, но не содержал информации в теле запроса, поэтому тело было проигнорировано
- Я нашел комментарий к вопросу StackOverflow, в котором упоминалось, что чтение тела запроса POST имеет какое-то влияние на буфер запросов nginx.
- Простое назначение тела запроса переменной (таким образом, считывание буфера) решило проблему
В конце концов, мне просто интересно, почему это происходит. Что это значит не прочитывать тело запроса, которое могло бы вызвать эту ошибку? Почему только nginx? Почему только Safari?
Я надеюсь, что сообщество StackOverflow поможет мне объяснить это! Было очень весело решать. Я также сделал короткую презентацию, чтобы поделиться с некоторыми сотрудниками.
Вы не укажете, какую версию nginx. Если он не обновлялся в течение нескольких месяцев, это может быть закрытая проблема:
Раньше окно потока оставалось равным нулю, чтобы предотвратить клиент от отправки органа запроса до его запроса (см. 887cca40ba6a). Пока такое начальное окно не было признано все запросы с данными были отклонены (подробности см. в разделе 0aa07850922f). Этот подход выявил ряд проблем: некоторые клиенты (особенно MS IE/Edge, Safari, приложения iOS) показывают ошибку или даже сбой, если поток отклоняется; Для этого требуется по крайней мере один RTT для каждого запроса с телом до того, как клиент получит обновление окна и сможет отправить данные. Чтобы преодолеть эти проблемы, новая директива “http2_body_preread_size” вводится. Он устанавливает начальное окно и настраивает специальный буфер для предварительной загрузки потока, который используется для сохранить все входящие данные до того, как тело будет запрошено и обработано.
Мое предположение заключается в создании ссылки, которая удерживает этот буфер открытым после того, как настройки ack идут туда и обратно.
Попробуйте обновить nginx, так как этот патч сложен. Если вы обновляете и все еще имеете проблему, это регресс, и я бы открыл новый билет nginx.
Источник
4 Ways To Fix Err_incomplete_chunked_encoding in Chrome
Disabling your Chrome extensions could help you fix this problem
- Website pages don’t load and CSS and JavaScript files get truncated when this annoying error arises in Google Chrome .
- This troubleshooting guide shows you the various steps you can use in order to efficiently fix the ERR_INCOMPLETE_CHUNKED_ENCODING issue easily.
- This error occurs when there is something wrong with your network, proxy, web browser, anti-virus software, as well as other causes.
Some users have posted on numerous forums about a Chrome ERR_INCOMPLETE_CHUNKED_ENCODING page-loading issue.
When that issue arises, website pages hang or don’t load correctly with Google Chrome displaying blank pages. JavaScript and CSS files also get truncated, which generates web form submission issues.
That issue typically arises for users utilizing Google Chrome within client/server network environments with Apache server software. Those users spot the ERR_INCOMPLETE_CHUNKED_ENCODING error message within Chrome’s developer console.
Why am I getting err_incomplete_chunked_encoding in Chrome?
We’re glad you asked this question and, as always, we’re here to provide an elaborate and trustworthy answer.
This error code is raised when the user doesn’t receive the final 0-length chunk of a chunked transfer. When it happens, website pages hang or fail to load correctly, and Google Chrome displays a blank page.
Furthermore, JavaScript and CSS files are also truncated, creating issues with the web form submission.
It’s important to understand that this problem usually occurs with users using Google Chrome in a client or server network environment with Apache server software.
What does err_incomplete_chunked_encoding mean?
It means that the process you were undergoing could no longer function due to a problem with your network, proxy, web browser, anti-virus software, or something like that which is breaking a network connection to your site.
Quick Tip:
It’s fairly usual to have problems with your browser, but that’s why there are alternatives. Because it may be some time until the Chrome issue is resolved, consider keeping a backup browser, such as Opera.
Most of the time, this great browser does not interfere with other applications, and the built-in proxy VPN may come in helpful in such conditions. Test Opera and see if you can make the switch.
Opera
The agony stops here, thanks to Chrome’s best alternative.
How do I fix err_incomplete_chunked_encoding in Chrome?
1. Disable prefetching in Google Chrome
- Open the Google Chrome browser the issue arises on.
- Click the Customize and Control Google Chrome menu button on the far right of the browser’s URL toolbar.
- Select Settings to open a tab that includes Chrome’s browser options.
- Click Cookies and other sitedata to open further options.
- Then scroll down to the Preload pages for faster browsing option shown directly below.
- Toggle the Preload pages option off if it’s on.
- Restart Chrome after turning off the Preload pages option.
2. Uninstall third-party antivirus software
- To uninstall a third-party antivirus utility in Windows, right-click the Start button and select Run.
- Type appwiz.cpl in Run’s text box, and press the Enter keyboard key.
- Next, select the antivirus utility listed within the uninstall program list.
- Click the Uninstall button to remove the antivirus software.
- Select Yes on the uninstall software confirmation prompts.
Users have specifically confirmed that the ERR_INCOMPLETE_CHUNKED_ENCODING error can arise due to Avast, Kaspersky, and ESET antivirus software. So, you should certainly uninstall those publishers’ antivirus software if you have any one of them installed.
To check if the ERR_INCOMPLETE_CHUNKED_ENCODING issue is due to your third-party antivirus software, try disabling its real-time protection first. If disabling its real-time protection fixes the issue, uninstall the antivirus software.
Many antivirus utilities have removal tools you can download that will more thoroughly remove them than Windows’ default uninstaller. The ESET site includes a handy index of removal tool links for the bigger antivirus software.
3. Disable Chrome’s extensions
- Click the Customize and Control Google Chrome button to open that browser’s menu.
- Click More Tools to open that submenu.
- Then select Extensions to open Chrome’s add-on tab.
- To turn off an extension, click its blue toggle button.
- Turn off all your Google Chrome extensions, and restart the browser.
4. Reset Google Chrome
- Open the Customize and Control Google Chrome menu at the top right of that browser’s window.
- Click Settings to open that tab in the browser.
- Scroll all the way down to the Advanced button on the Settings tab.
- Click Advanced to extend the options on the Settings tab.
- Then scroll further down to the Restore settings to their original defaults option.
- Click Restore settings to their original defaults to select that option.
- Press the Reset settings button to provide confirmation.
Now you have troubleshooting solutions for errors such as err_incomplete_chunked_encoding 200, or failed to load resource: net::err_incomplete_chunked_encoding.
Situations such as this aren’t to be taken lightly and immediate actions are required for err_incomplete_chunked_encoding chrome.
The issue can come in many forms, displaying messages such as err_incomplete_chunked_encoding 500, or maybe err_incomplete_chunked_encoding chrome jsp.
There are other potential fixes for the ERR_INCOMPLETE_CHUNKED_ENCODING error.
However, the above resolutions are confirmed fixes that have resolved the issue for many users.
Still having issues? Fix them with this tool:
Источник
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
apexJCL opened this issue
May 13, 2017
· 4 comments
Comments
Operating System Information:
Windows Build Number: 10.0.15063 (15063.296)
Windows Version: Windows 10 Home Single Language x64
Version: 1703
Issue:
Running an NGINX instance with PHP-FPM enabled gives a timeout and an error on console net::ERR_INCOMPLETE_CHUNKED_ENCODING
Steps to reproduce:
- Enable/Install WLS
- Update/Upgrade (
apt update && apt upgrade
) - Install NGINX
- Install php-fpm
- Configure NGINX to use
php7.0-fpm
socket and supportindex.php
file - Delete default
index
and create a new like following:
index.php
Behavior:
After enabling both services (service nginx start
and service php7.0-fpm start
), entering address 127.0.0.1 or localhost renders the phpinfo() but keeps waiting for a request finish. Secods later, on console an error will appear that reads net::ERR_INCOMPLETE_CHUNKED_ENCODING
Accesing the default index.html
works alright, so I assume it all relies on php-fpm
side
@Line117 I already checked your answer, here’s what I did:
TL:DR
Adding fastcgi_buffering off;
as explained here did the trick, now pages are loading fast and smoothly.
- Install NGINX from stable releases (the same as you)
- From here on, doing this changes the default user, because installing from Ubuntu repos gives you
www-data
user, whereas installing from NGINX repos gives younginx
user. - Install
php-fpm
- In the
nginx.conf
file, add on thehttp
block the linefastcgi_buffering off;
. - Restart
nginx
andphp7.0-fpm
service
I’d take a stake (blindly) and assume that the buffering issue it’s due to disk access/filesystem related. I guess I can close this issue.
valdrinium, adamk33n3r, paulocoghi, kojinobumoto, and darksv reacted with laugh emoji
Kynno, vadimbashirof, AxelPAL, limonte, xdhan, avxkim, valdrinium, adamk33n3r, EngKhaledB, paulocoghi, and 2 more reacted with hooray emoji
valdrinium, OCharnyshevich, dmitry-kozachek, adamk33n3r, Mathem8tic, Kuijkens, EngKhaledB, paulocoghi, darksv, marcraheb97, and pjrfigueiredo reacted with heart emoji
After adding fastcgi_buffering off;
I’ve encountered the fastcgi_cache does not work (fastcgi became not to save any cache file).
As being described in nginx’s manual, nginx seemed not try to read the response from the FastCGI server.
So, I’ve increased the fastcgi_buffer_size.
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
Now, the net::ERR_INCOMPLETE_CHUNKED_ENCODING
had disappeared and fastcgi_cache works.
After adding
fastcgi_buffering off;
I’ve encountered the fastcgi_cache does not work (fastcgi became not to save any cache file).
As being described in nginx’s manual, nginx seemed not try to read the response from the FastCGI server.
So, I’ve increased the fastcgi_buffer_size.fastcgi_buffer_size 128k; fastcgi_buffers 4 256k;
Now, the
net::ERR_INCOMPLETE_CHUNKED_ENCODING
had disappeared and fastcgi_cache works.
I’m running into a slightly different issue: about 2/5 of the requests hangs, and will eventually load if I keep refreshing.
Using
solved the problem.
I also tried your suggesting with fastcgi_buffer_size, but it didn’t help for me. At least in my environment, it seems that the bug is with this module.
-
React
-
Nginx
Всем привет. Когда next image запрашивает фотку то в консоли ошибка net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK) и плюс если перейти по ссылке которую генерирует next image то можно видеть что картинка показывает на половинку, а остальное белое. Может кто нибудь сталкивался, прошу помощи.
-
Вопрос задан25 февр. 2022
-
374 просмотра
Комментировать
Пригласить эксперта
Ответы на вопрос 1
-
roaddd, а с какими именно картинками проблема? И факт того, что проблема плавающая не гарантирует того, что проблема не в антивирусе.
-
roaddd, первая загрузилась полностью без проблем, вторая загрузилась примерно на 80% — выглядит так, как буд-то сама картинка повреждена (битый файл).
-
Александр Карабанов, Это две одинаковые картинки. Просто ставится в урл определенный width. Именно проблема в том что чем больше width тем он загружает малую часть часть. На сайте под копотом nginx
-
roaddd, каким способом изменяется размер изображения?
-
roaddd, ощущение, что картинка не помещается в буфер, Nginx пытается сохранить тело запроса не поместившееся в буфер на диск, но прав на запись не хватает.
Проверь error.log
Похожие вопросы
-
Показать ещё
Загружается…
KLBR
•
Санкт-Петербург
от 130 000 до 180 000 ₽
09 февр. 2023, в 15:56
20000 руб./за проект
09 февр. 2023, в 15:55
75000 руб./за проект
09 февр. 2023, в 15:13
2000 руб./за проект
Минуточку внимания
- Table of contents
- Error: incomplete chunked encoding in php scripts
- Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error
- Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
- FIX: WordPress on nginx (ERR_INCOMPLETE_CHUNKED_ENCODING)
- Apache? ERR_INCOMPLETE_CHUNKED_ENCODING 200
- DebugAH
Error: incomplete chunked encoding in php scripts
<?php set_time_limit(3600); error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); function generateRandomString($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[mt_rand(0, $charactersLength - 1)]; } return $randomString; } isset($_REQUEST["limit"]) ? $limit = $_REQUEST["limit"] : $limit = 10; echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">'; echo "<title>Test Script</title></head><body>"; //ob_start (); echo "<br><br>A random delay between 20 and 60 seconds will be generated, then a randomly generated string will be displayed<br>The default limit on iterations is ten<br>When the script terminates normally, the phrase "test complete" will be output at the bottom<br><br>"; flush(); for ($i = 0; $i < $limit; $i++) { $delay = mt_rand (20, 60); echo "<br><br><br>iteration ".($i+1)." - script will now sleep for $delay seconds"; flush(); sleep ($delay); echo "<br><br>Here is a random string:<br>"; $length = mt_rand (50, 100); echo generateRandomString($length); flush(); } echo '<br><br>...test complete</body></html>'; ob_end_flush(); ?>
<?php set_time_limit(600); error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); isset($_REQUEST["limit"]) ? $limit = $_REQUEST["limit"] : $limit = 15; isset($_REQUEST["longorshort"]) ? $longorshort = $_REQUEST["longorshort"] : $longorshort = "long"; $start = 1; echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">'; echo "<title>Test Script 2</title></head><body>"; echo '<script src="test_script_js7.js"></script>'; echo " <br>Clicking the button below will start the script running <br>The script called via XMLHttpRequest will generate a random delay between 40 and 55 seconds (5-10 seconds if "longorshort" is set to "short" in the url string), then a randomly generated string will be displayed in the table on the bottom <br>The default limit on iterations is fifteen <br>When the process terminates normally, the phrase "test complete" will be output in the "Main Info" cell <br><b>The script called via XMLHttpRequest will <u>never take more than 60 seconds</u> to complete processing</b> "; //echo "<img src=http://nzbstar.info/download_batch.png onclick="getter($limit, '$start', '$longorshort')"><br>"; echo "<br><img src=start.jpg onclick="getter_outer($limit, '$start', '$longorshort')"><br><a href="javascript:master_switch();">click here to abort</a> "; echo "<table border=1><tr>"; echo "<td valign=top><div id=main_info>Main Info:</div></td>"; echo "<td valign=top><div id=iteration>Iterations:</div></td>"; echo "<td valign=top><div id=message>Messages:</div></td>"; echo "</tr></table>"; echo "<table border=1 style=table-layout:fixed;><tr>"; for ($i = 1; $i <= $limit; $i++) { echo "<td valign=top><div class=getter id=post_$i><i>Result $i</i></div></td>"; if ( ($i%5 == 0) ) {echo "</tr><tr>";} } echo "</tr></table>"; echo '</body></html>'; ?>
var master_off = false; var getter_running_now = false; function getter_outer(limit, i, longorshort){ if (getter_running_now) {alert ("Script is already running!"); return;} getter_running_now = true; if (master_off) {document.getElementById("main_info").innerHTML += "<br>master switch off, aborting!"; return;} if (i >= limit) {document.getElementById("main_info").innerHTML += "<br>Got to the next getter when we shouldn't have, there's a bug!"; return;} getter(limit, i, longorshort); } function getter(limit, i, longorshort){ if (master_off) {document.getElementById("main_info").innerHTML += "<br>master switch off, aborting!"; return;} if (i >= limit) {document.getElementById("main_info").innerHTML += "<br>Got to the next getter when we shouldn't have, there's a bug!"; return;} var post_number_element = "post_" + i; var batch_result_script = "test_script_2a.php?longorshort=" + longorshort; document.getElementById("iteration").innerHTML = "Iterations:<br>Doing iteration: " + i; document.getElementById(post_number_element).innerHTML = "doing this one...<br>"; var xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4){ if (xmlhttp.status==200){ var result = "<b>result for " + post_number_element + " is:</b><br>" + xmlhttp.responseText + "<br><span style=color:green;>Success!</span>"; document.getElementById(post_number_element).innerHTML = result; i++; if (i >= limit) { document.getElementById("main_info").innerHTML += "<br><span style=color:green;>Test complete!</span>"; } else {getter(limit, i, longorshort);} } else {document.getElementById("message").innerHTML += "<br> - <span style=color:red;>http return status for iteration " + i + " was " + xmlhttp.status + "</span>";} } } xmlhttp.open("GET",batch_result_script,true); xmlhttp.send(); } function master_switch(){ master_off = true; document.getElementById("main_info").innerHTML += "<br><span style=color:red;>Master Switch Off!</span>";
<?php set_time_limit(600); error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); function generateRandomString($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[mt_rand(0, $charactersLength - 1)]; } return $randomString; } if ( isset($_REQUEST["longorshort"]) && $_REQUEST["longorshort"] == "short" ) {$delay = mt_rand (5, 10);} else {$delay = mt_rand (40, 55);} sleep ($delay); echo "<br>Here is a random string:<br>"; $length = mt_rand (5, 10); echo generateRandomString($length); ?>
Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error
net::ERR_INCOMPLETE_CHUNKED_ENCODING
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection:close Content-Encoding:gzip Content-Type:text/html; charset=utf-8 Date:Mon, 27 Apr 2015 10:52:52 GMT Expires:Thu, 19 Nov 1981 08:52:00 GMT Pragma:no-cache Server:Apache/2.2.22 (Ubuntu) Transfer-Encoding:chunked Vary:Accept-Encoding X-Powered-By:PHP/5.3.10-1ubuntu3.8
SetEnv downgrade-1.0
<?php // ... your code flush(); ob_flush(); sleep(2); exit(0); ?>
<?php // ... your while code set_time_limit(30); // ... more while code ?>
//Gather output (if it is not already in a variable, use ob_start() and ob_get_clean() ) // Before sending output: header('Content-length: ' . strlen($output));
php_value opcache.enable 0
$ sudo rm -rf /usr/local/var/run/nginx/ $ sudo nginx -s stop $ sudo mkdir /usr/local/var/run/nginx/ $ sudo chown nobody:nobody /usr/local/var/run/nginx/ $ sudo nginx
location / { .... proxy_read_timeout 120s .... }
# ------------------------------------------------------------------------------ # | Expires headers (for better cache control) | # ------------------------------------------------------------------------------ # The following expires headers are set pretty far in the future. If you don't # control versioning with filename-based cache busting, consider lowering the # cache time for resources like CSS and JS to something like 1 week. <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1 month" # CSS ExpiresByType text/css "access plus 1 week" # Data interchange ExpiresByType application/json "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType text/xml "access plus 0 seconds" # Favicon (cannot be renamed!) ExpiresByType image/x-icon "access plus 1 week" # HTML components (HTCs) ExpiresByType text/x-component "access plus 1 month" # HTML ExpiresByType text/html "access plus 0 seconds" # JavaScript ExpiresByType application/javascript "access plus 1 week" # Manifest files ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" ExpiresByType text/cache-manifest "access plus 0 seconds" # Media ExpiresByType audio/ogg "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType video/mp4 "access plus 1 month" ExpiresByType video/ogg "access plus 1 month" ExpiresByType video/webm "access plus 1 month" # Web feeds ExpiresByType application/atom+xml "access plus 1 hour" ExpiresByType application/rss+xml "access plus 1 hour" # Web fonts ExpiresByType application/font-woff "access plus 1 month" ExpiresByType application/vnd.ms-fontobject "access plus 1 month" ExpiresByType application/x-font-ttf "access plus 1 month" ExpiresByType font/opentype "access plus 1 month" ExpiresByType image/svg+xml "access plus 1 month" </IfModule> # ------------------------------------------------------------------------------ # | Compression | # ------------------------------------------------------------------------------ <IfModule mod_deflate.c> # Force compression for mangled headers. # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping <IfModule mod_setenvif.c> <IfModule mod_headers.c> SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)s*,?s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding </IfModule> </IfModule> # Compress all output labeled with one of the following MIME-types # (for Apache versions below 2.3.7, you don't need to enable `mod_filter` # and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines # as `AddOutputFilterByType` is still in the core directives). <IfModule mod_filter.c> AddOutputFilterByType DEFLATE application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/svg+xml image/x-icon text/css text/html text/plain text/x-component text/xml </IfModule> </IfModule> # ------------------------------------------------------------------------------ # | Persistent connections | # ------------------------------------------------------------------------------ # Allow multiple requests to be sent over the same TCP connection: # http://httpd.apache.org/docs/current/en/mod/core.html#keepalive. # Enable if you serve a lot of static content but, be aware of the # possible disadvantages! <IfModule mod_headers.c> Header set Connection Keep-Alive </IfModule>
<?php ob_start(); ?> <!DOCTYPE html> <html lang="de"> ..... ....//your whole code .... </html> <?php ob_clean(); ob_end_flush(); ob_flush(); ?>
chown -R www-data:www-data /var/lib/nginx
ini_set('max_execution_time', 300); //300 seconds = 5 minutes
1.Kill the anti-virus software process 2.Close chrome's Prerendering Instant pages feature 3.Try to close all the apps in your browser 4.Try to define your Content-Length header <?php header('Content-length: ' . strlen($output)); ?> 5.Check your nginx fastcgi buffer is right 6.Check your nginx gzip is open
echo "n"; flush(); ob_flush(); exit(0);
Saved crash report for httpd[99969] version 2.4.16 (805) to /Library/Logs/DiagnosticReports/httpd.crash
Process: httpd [99974] Path: /usr/sbin/httpd Identifier: httpd Version: 2.4.16 (805) Code Type: X86-64 (Native) Parent Process: httpd [99245] Responsible: httpd [99974] User ID: 70 PlugIn Path: /usr/local/opt/php70-mongodb/mongodb.so PlugIn Identifier: mongodb.so
Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
SetEnv downgrade-1.0
FIX: WordPress on nginx (ERR_INCOMPLETE_CHUNKED_ENCODING)
/wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload&ver=4.2.3
user www-data; worker_processes 4; pid runnginx.pid;
user = www-data group = www-data listen = varrunphp5-fpm.sock listen.owner = www-data listen.group = www-dataL
Apache? ERR_INCOMPLETE_CHUNKED_ENCODING 200
GET https://www.******.com/ net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)
<Directory /var/www/******.com> AllowOverride None Require all denied </Directory> <VirtualHost 1.1.1.1:443> DocumentRoot /var/www/clients/client0/web1/web/public ServerName ******.com ServerAlias www.******.com ServerAdmin [email protected]******.com SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 ErrorLog /var/log/apache2/******_error.log CustomLog /var/log/apache2/******_access.log combined <IfModule mod_ssl.c> SSLEngine on SSLProtocol All -SSLv2 -SSLv3 # SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS SSLHonorCipherOrder on # <IfModule mod_headers.c> # Header always add Strict-Transport-Security "max-age=15768000" # </IfModule> SSLCertificateFile /var/www/clients/client0/web1/ssl/******.com-le.crt SSLCertificateKeyFile /var/www/clients/client0/web1/ssl/******.com-le.key SSLCertificateChainFile /var/www/clients/client0/web1/ssl/******.com-le.bundle SSLUseStapling on SSLStaplingResponderTimeout 5 SSLStaplingReturnResponderErrors off </IfModule> <Directory /var/www/clients/client0/web1/web> # Clear PHP settings of this website Options +FollowSymLinks AllowOverride All Require all granted FallbackResource /index.php </Directory> <FilesMatch .php$> SetHandler proxy:unix:/var/lib/php7.2-fpm/web1.sock|fcgi://localhost </FilesMatch> # suexec enabled <IfModule mod_suexec.c> SuexecUserGroup web1 client0 </IfModule> # add support for apache mpm_itk <IfModule mpm_itk_module> AssignUserId web1 client0 </IfModule> <IfModule mod_dav_fs.c> # Do not execute PHP files in webdav directory <Directory /var/www/clients/client0/web1/webdav> <ifModule mod_security2.c> SecRuleRemoveById 960015 SecRuleRemoveById 960032 </ifModule> <FilesMatch ".ph(p3?|tml)$"> SetHandler None </FilesMatch> </Directory> DavLockDB /var/www/clients/client0/web1/tmp/DavLock # DO NOT REMOVE THE COMMENTS! # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE! # WEBDAV BEGIN # WEBDAV END </IfModule> </VirtualHost> <IfModule mod_ssl.c> SSLStaplingCache shmcb:/var/run/ocsp(128000) </IfModule>
DebugAH
/var/lib/nginx/tmp/fastcgi/2/37/0000000372" failed (13: Permission denied) while reading upstream, client: 10.18.128.147, server: deploy.mgame.qihoo.net, request: "GET /walle/deploy?taskId=147 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "deploy.xxx.com:8081"
chown -R www:www /var/lib/nginx
Next Lesson PHP Tutorial
Over the weekend I was migrating several of my sites over to an nginx-based VPS. Whilst the migration itself seemed to go fine, I was getting a weird issue with the WordPress admin where the styles and javascript was not fully loading.
After inspecting the requests with the Firebug Console, I saw that the culprit was the request:
/wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload&ver=4.2.3
I tried the normal fixes such as checking permissions, updating everything, and even reinstalling WordPress but to no avail. Then I started looking on Google for a potential fix and found this article which not only provides the solution, but also a detailed explanation of why the error occurs in the first place.
As soon as I made the recommended updates, all the sites started working properly with no issue whatsoever.
Full credit goes to the article author. Just posting here for my own reference more than anything else!
UPDATE: As the original article no longer exists I’ve posted the instructions below:
It turns out the solution to this is quite simple. Nginx and php-fpm need to run as the same user and the directory /var/lib/nginx
needs to be owned by that user. Personally I like to run all my web-related services under a www-data
user, but running it under a nginx
or apache
user is also common. To change the user nginx runs under, edit the main nginx config file usually located at /etc/nginx/nginx.conf
:
user www-data; worker_processes 4; pid runnginx.pid;
Now to change the user php-fpm runs under we need to edit its config file. On my Amazon Linux system this was located at /etc/php-fpm.d/www.conf
while on my old Debian setup it was located at /etc/php5/fpm/pool.d/www.conf
. There are two user-related settings in the config file. First, if php-fpm runs as a socket (as opposed to listening on a port), the user and group owner of the socket should be set to the same user as nginx so that nginx can access it to run php files. This is not relevant for our error, but can cause other issues if nginx doesnt have permissions to access the socket. Second, the user and group that the php-fpm process runs under needs to be the same as nginx.
user = www-data group = www-data listen = varrunphp5-fpm.sock listen.owner = www-data listen.group = www-dataL
To change the ownership of the nginx lib directory simply run the command chown -R www-data:www-data /var/lib/nginx
as root (sudo
will do on most systems). Finally, if we edited any config files, we need to restart the appropriate services for the changes to take effect. On most systems this can be done by running service nginx restart
or /etc/init.d/nginx restart
as root. For php-fpm the service name is php5-fpm
.
Disabling your Chrome extensions could help you fix this problem
by Matthew Adams
Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things… read more
Updated on January 27, 2023
Fact checked by
Alex Serban
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server… read more
- Website pages don’t load and CSS and JavaScript files get truncated when this annoying error arises in Google Chrome.
- This troubleshooting guide shows you the various steps you can use in order to efficiently fix the ERR_INCOMPLETE_CHUNKED_ENCODING issue easily.
- This error occurs when there is something wrong with your network, proxy, web browser, anti-virus software, as well as other causes.
- Easy migration: use the Opera assistant to transfer exiting data, such as bookmarks, passwords, etc.
- Optimize resource usage: your RAM memory is used more efficiently than Chrome does
- Enhanced privacy: free and unlimited VPN integrated
- No ads: built-in Ad Blocker speeds up loading of pages and protects against data-mining
- Download Opera
Some users have posted on numerous forums about a Chrome ERR_INCOMPLETE_CHUNKED_ENCODING page-loading issue.
When that issue arises, website pages hang or don’t load correctly with Google Chrome displaying blank pages. JavaScript and CSS files also get truncated, which generates web form submission issues.
That issue typically arises for users utilizing Google Chrome within client/server network environments with Apache server software. Those users spot the ERR_INCOMPLETE_CHUNKED_ENCODING error message within Chrome’s developer console.
- Why am I getting err_incomplete_chunked_encoding in Chrome?
- What does err_incomplete_chunked_encoding mean?
- How do I fix err_incomplete_chunked_encoding in Chrome?
- 1. Disable prefetching in Google Chrome
- 2. Uninstall third-party antivirus software
- 3. Disable Chrome’s extensions
- 4. Reset Google Chrome
Why am I getting err_incomplete_chunked_encoding in Chrome?
We’re glad you asked this question and, as always, we’re here to provide an elaborate and trustworthy answer.
This error code is raised when the user doesn’t receive the final 0-length chunk of a chunked transfer. When it happens, website pages hang or fail to load correctly, and Google Chrome displays a blank page.
Furthermore, JavaScript and CSS files are also truncated, creating issues with the web form submission.
It’s important to understand that this problem usually occurs with users using Google Chrome in a client or server network environment with Apache server software.
What does err_incomplete_chunked_encoding mean?
It means that the process you were undergoing could no longer function due to a problem with your network, proxy, web browser, anti-virus software, or something like that which is breaking a network connection to your site.
Quick Tip:
It’s fairly usual to have problems with your browser, but that’s why there are alternatives. Because it may be some time until the Chrome issue is resolved, consider keeping a backup browser, such as Opera.
Most of the time, this great browser does not interfere with other applications, and the built-in proxy VPN may come in helpful in such conditions. Test Opera and see if you can make the switch.
Opera
The agony stops here, thanks to Chrome’s best alternative.
How do I fix err_incomplete_chunked_encoding in Chrome?
1. Disable prefetching in Google Chrome
- Open the Google Chrome browser the issue arises on.
- Click the Customize and Control Google Chrome menu button on the far right of the browser’s URL toolbar.
- Select Settings to open a tab that includes Chrome’s browser options.
- Click Cookies and other site data to open further options.
- Then scroll down to the Preload pages for faster browsing option shown directly below.
- Toggle the Preload pages option off if it’s on.
- Restart Chrome after turning off the Preload pages option.
2. Uninstall third-party antivirus software
- To uninstall a third-party antivirus utility in Windows, right-click the Start button and select Run.
- Type appwiz.cpl in Run’s text box, and press the Enter keyboard key.
- Next, select the antivirus utility listed within the uninstall program list.
- Click the Uninstall button to remove the antivirus software.
- Select Yes on the uninstall software confirmation prompts.
Users have specifically confirmed that the ERR_INCOMPLETE_CHUNKED_ENCODING error can arise due to Avast, Kaspersky, and ESET antivirus software. So, you should certainly uninstall those publishers’ antivirus software if you have any one of them installed.
To check if the ERR_INCOMPLETE_CHUNKED_ENCODING issue is due to your third-party antivirus software, try disabling its real-time protection first. If disabling its real-time protection fixes the issue, uninstall the antivirus software.
Many antivirus utilities have removal tools you can download that will more thoroughly remove them than Windows’ default uninstaller. The ESET site includes a handy index of removal tool links for the bigger antivirus software.
3. Disable Chrome’s extensions
- Click the Customize and Control Google Chrome button to open that browser’s menu.
- Click More Tools to open that submenu.
- Then select Extensions to open Chrome’s add-on tab.
- To turn off an extension, click its blue toggle button.
- Turn off all your Google Chrome extensions, and restart the browser.
4. Reset Google Chrome
- Open the Customize and Control Google Chrome menu at the top right of that browser’s window.
- Click Settings to open that tab in the browser.
- Scroll all the way down to the Advanced button on the Settings tab.
- Click Advanced to extend the options on the Settings tab.
- Then scroll further down to the Restore settings to their original defaults option.
- Click Restore settings to their original defaults to select that option.
- Press the Reset settings button to provide confirmation.
Now you have troubleshooting solutions for errors such as err_incomplete_chunked_encoding 200, or failed to load resource: net::err_incomplete_chunked_encoding.
Situations such as this aren’t to be taken lightly and immediate actions are required for err_incomplete_chunked_encoding chrome.
The issue can come in many forms, displaying messages such as err_incomplete_chunked_encoding 500, or maybe err_incomplete_chunked_encoding chrome jsp.
There are other potential fixes for the ERR_INCOMPLETE_CHUNKED_ENCODING error.
However, the above resolutions are confirmed fixes that have resolved the issue for many users.
Still having issues? Fix them with this tool:
SPONSORED
If the advices above haven’t solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on TrustPilot.com) to easily address them. After installation, simply click the Start Scan button and then press on Repair All.
Newsletter
В течение последних двух месяцев я получал следующую ошибку на консоли разработчика Chrome:
net::ERR_INCOMPLETE_CHUNKED_ENCODING
Симптомы:
- Страницы не загружаются.
- Усеченные файлы CSS и JS.
- Страницы висят.
Серверная среда:
- Apache 2.2.22
- PHP
- Ubuntu
Это происходит со мной на нашем собственном сервере Apache. Это не происходит ни с кем другим, т.е. Никто из наших пользователей не сталкивается с этой проблемой, как и никто другой в нашей команде разработчиков.
Другие люди получают доступ к тому же серверу с точно такой же версией Chrome. Я также попытался отключить все расширения и просмотр в режиме инкогнито — безрезультатно.
Я использовал Firefox, и происходит то же самое. Усеченные файлы и еще много чего. Единственное, что Firefox не вызывает никаких ошибок консоли, поэтому вам нужно проверить HTTP-запрос через Firebug, чтобы увидеть проблему.
Заголовки ответа от Apache:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:close
Content-Encoding:gzip
Content-Type:text/html; charset=utf-8
Date:Mon, 27 Apr 2015 10:52:52 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Pragma:no-cache
Server:Apache/2.2.22 (Ubuntu)
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Powered-By:PHP/5.3.10-1ubuntu3.8
Во время тестирования я смог решить проблему, применив HTTP 1.0 в моем файле htaccess:
SetEnv downgrade-1.0
Это избавляет от проблемы. Однако принудительное использование HTTP 1.0 вместо HTTP 1.1 не является правильным решением.
ОбновитьПоскольку я являюсь единственным, кто столкнулся с этой проблемой, я решил, что мне нужно потратить больше времени на выяснение того, было ли это проблемой на стороне клиента. Если я захожу в настройки Chrome и использую опцию «Восстановить по умолчанию», проблема исчезнет минут 10-20. Тогда это возвращается.
96
Решение
ХОРОШО. Я трижды проверил это, и я Уверен на 100% что это вызвано моим антивирусом (ESET NOD32 ANTIVIRUS 5).
Всякий раз, когда я отключаю защиту в реальном времени, проблема исчезает. Сегодня я отключил защиту в реальном времени на 6-7 часов, и проблема никогда не возникала.
Несколько мгновений назад я снова включил его, только чтобы проблема всплыла в течение минуты.
В течение последних 24 часов я включал и выключал защиту в реальном времени, чтобы быть уверенным. Каждый раз — результат был одинаковым.
Обновление: я столкнулся с другим разработчиком, у которого была точно такая же проблема с защитой в реальном времени на его антивирусе Касперского. Он отключил это, и проблема ушла. Т.е. эта проблема, похоже, не ограничивается ESET.
64
Другие решения
Ошибка пытается сказать, что Chrome был отключен во время отправки страницы. Ваша проблема пытается выяснить, почему.
По-видимому, это может быть известной проблемой, затрагивающей несколько версий Chrome. Насколько я могу судить, проблема заключается в том, что эти версии очень чувствительны к длине контента отправляемого чанка и выраженному размеру этого чанка (я мог бы быть далек от этого). Короче говоря, немного несовершенные проблемы заголовков.
С другой стороны, может случиться так, что сервер не отправит терминалу порцию 0 длины. Что может быть исправлено с ob_flush();
, Также возможно, что Chrome (или соединение или что-то) работает медленно, поэтому, когда соединение закрыто, страница еще не загружена. Я понятия не имею, почему это может произойти.
Вот параноидальный ответ программистов:
<?php
// ... your code
flush();
ob_flush();
sleep(2);
exit(0);
?>
В вашем случае это может быть случай истечения срока действия скрипта. Я не совсем уверен, почему это должно повлиять только на вас, но это может быть сделано в кучу условий гонки? Это полное предположение. Вы должны быть в состоянии проверить это, увеличив время выполнения скрипта.
<?php
// ... your while code
set_time_limit(30);
// ... more while code
?>
Это также может быть так просто, как вам нужно обновить установку Chrome (поскольку эта проблема специфична для Chrome).
- https://code.google.com/p/chromium/issues/detail?id=461213
- IIS & Chrome: не удалось загрузить ресурс: net :: ERR_INCOMPLETE_CHUNKED_ENCODING
- https://wordpress.org/support/topic/interface-issue-err_incomplete_chunked_encoding
ОБНОВИТЬ: Я смог повторить эту ошибку (наконец-то), когда была выдана фатальная ошибка, когда PHP (на том же локальном хосте) был выходная буферизация. Я предполагаю, что вывод был слишком плохо искажен, чтобы быть полезным (заголовки, но мало или нет контента).
В частности, мой код рекурсивно вызывал себя случайно, пока PHP, по праву, не сдался. Таким образом, сервер не отправил порцию терминала длиной 0 — что было проблемой, которую я идентифицировал ранее.
33
У меня была эта проблема. Отследил это после того, как попробовал большинство других ответов на этот вопрос. Это было вызвано владельцем и разрешениями /var/lib/nginx
и более конкретно /var/lib/nginx/tmp
каталог неверен.
Каталог tmp используется fast-cgi для кэширования ответов по мере их генерирования, но только если они превышают определенный размер. Таким образом, проблема является периодической и возникает только тогда, когда сгенерированный ответ является большим.
Проверить nginx <host_name>.error_log
чтобы увидеть, есть ли у вас проблемы с разрешениями.
Чтобы исправить, убедитесь, что владелец и группа /var/lib/nginx
и все подкаталоги — это nginx.
26
Следующее должно исправить это для каждого клиента.
//Gather output (if it is not already in a variable, use ob_start() and ob_get_clean() )
// Before sending output:
header('Content-length: ' . strlen($output));
Но в моем случае было лучше и исправил следующее:
.Htaccess:
php_value opcache.enable 0
15
О боже, у меня была такая же проблема 5 минут назад. Я потратил несколько часов, чтобы найти решение. На первый взгляд отключение антивируса решило проблему на Windows. Но затем я заметил проблему на другом компьютере с Linux без антивируса. Нет ошибок в логах nginx. мой uwsgi
показал что-то про «Разбитую трубу» но не на все запросы.
Знаешь что? На устройстве не осталось места, которое я обнаружил при перезапуске сервера в журнале базы данных, и df
одобрил это. Единственное объяснение того, почему антивирус был решен, заключается в том, что он предотвращает кэширование браузера (он должен проверять каждый запрос), но браузер с некоторым странным поведением может просто игнорировать неверный ответ и отображать кэшированные ответы.
6
Это известная проблема Chrome. По мнению Chrome и Chromium, для этого нет универсального решения. Эта проблема не связана с типом и версией сервера, она прямо в Chrome.
настройка Content-Encoding
заголовок к identity
решил эту проблему для меня.
от developer.mozilla.org
личность | Указывает тождественную функцию (то есть ни сжатие, ни
модификация).
Итак, я могу предположить, что в некоторых случаях Chrome не может правильно выполнить сжатие gzip.
4
В моем случае у меня было /usr/local/var/run/nginx/fastcgi_temp/3/07/0000000073" failed (13: Permission denied)
что, вероятно, привело к ошибке Chrome net :: ERR_INCOMPLETE_CHUNKED_ENCODING.
Я должен был удалить /usr/local/var/run/nginx/
и пусть nginx создаст его снова.
$ sudo rm -rf /usr/local/var/run/nginx/
$ sudo nginx -s stop
$ sudo mkdir /usr/local/var/run/nginx/
$ sudo chown nobody:nobody /usr/local/var/run/nginx/
$ sudo nginx
3
Здесь проблема была в моем Avast AV.
Как только я отключил его, проблема исчезла.
Но я действительно хотел бы понять причину такого поведения.
2