0

Hosted Laravel 5.2 app on centos server. It works fine. But all of sudden (randomly) "ERR_EMPTY_RESPONSE" error starts, After this each page of Application shows the same error.

However if you open same URL on different browser / Machine it works perfectly, but in that particular browser it does not load. Wait for 20 , 30 mins and try reloading page, it again works.

I have changed permission of vendor, public & storage folders in laravel5.2 directory.

Seems like cache issue to me. If anyone has similar issues please help.

Tried checking ngnix access /error logs, nothing found there as well. :(

Same URL works fine in Incogito mode.

Thanx in Advance.

Gaurav Bakshi
  • 430
  • 1
  • 6
  • 13
  • Tried googling and found this error comes in laravel if one have comments in blade template ({{-- --}}), but in my case page loads once / many times and stops randomly. – Gaurav Bakshi May 12 '16 at 10:20
  • try to run composer update once – Pardeep Pathania May 13 '16 at 04:29
  • When ever issue comes. i Tried clearing cache of browser and starts working fine for some time. Kind of weird but true. :( – Gaurav Bakshi Jun 14 '16 at 04:47
  • yes there may be the issue of cache so try to clear cache – Pardeep Pathania Jun 14 '16 at 07:01
  • @PardeepPathania, i tried clearing cache of server, But that did'nt helped. Things starts working after browser cache. How can i control any browser cache ?? – Gaurav Bakshi Jun 14 '16 at 10:52
  • return view('some_template')->header('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0'); please check this http://stackoverflow.com/questions/19012698/browser-cache-issues-in-laravel-4-application – Pardeep Pathania Jun 15 '16 at 05:36
  • Done that also, I made a Middleware and done above mentioned stuff in that. All routes are in that middleware. Still issue is coming abrubptly – Gaurav Bakshi Jul 18 '16 at 08:58

1 Answers1

1

Please make a try adding this line at the top of .htaccess file in ur project

php_flag opcache.enable Off

hope it works for you.

riaz hasan
  • 1,155
  • 2
  • 8
  • 20