php - net - unexpectedly closed the connection err_incomplete_chunked_encoding
Laravel 5.1.1 LTS: Incomplete Chunked Encoding (2)
After having looked at the answers here and realising that this is a bizarre issue, I tried falling back to the normal
mod_rewrite approach, and it started working as expected.
Interestingly enough, this did not happen the first time, which is why the question was posted.
As such, this is more than likely a server issue. Running the app from a production server with the setup described in my question worked perfectly.
I've seen lots of these reports, but none regarding the most recent laravel 5.1.1 (LTS). Have just started a new app, and I'm receiving the following error when requesting
GET http://app.local/ net::ERR_INCOMPLETE_CHUNKED_ENCODING
It takes just over 5 seconds for it to come to this conclusion.
Now, this is essentially a fresh installation - I've only made the following changes:
mod_rewritefor sending the request to
- Set the application path to
config, etc to
I only get the above error when sending a request to the root of the domain - that is
app.local/. There is an existing route for this, and it is set to return "Hello" (
return response('Hello')). That response is displayed immediately, but the page continues to load for 5 seconds, and then the console throws that error.
If I request
/test, the response is snappy, and I don't receive the error.
Seemingly, this is a Laravel problem, and I'm not quite sure where it comes from. It's not an
.htaccess problem as reverting my changes makes no difference. Alternatively, it could be an Apache problem, but nothing points to that being the case.
For reference, I'm running Apache 2.4 with PHP 5.6 on Windows 8.1.
This issue isn't limited to Chrome like others have reported for previous versions.
Any guidance would be appreciated.
Update: Having tested on the same VirtualHost, Laravel 4.2 appears to be doing the same thing. Could this, in fact, be a server issue?
I don't have enough reputation to comment, which is all this warrants as opposed to a response. Generally this is related to caching, either at the server or application level. Assuming this is a completely default install (no app.php configuration), things to check:
File permissions. By default Laravel will use "file" based caching: http://laravel.com/docs/5.1/cache
Incorrect file permissions in some server configurations can cause this (see here to set correct permissions: http://laravel.com/docs/5.1/installation#basic-configuration). If permissions are correct, swap to Database caching and see if that makes a difference (You'll need to create the schema).
Apache error logs. Same situation, if Laravel is streaming some output then failing on index, may be some information here.
If it's a non-standard Laravel install, knowing what you've configured would help?