Laravel 4: 502 Bad Gateway with Nginx in only one view

I have a strange error on my server with nginx because I have been working on this project for many months and everything works fine except for only one view / page which I added because it shows me 502 Bad Gateway but I don't I understand why.

  • I already removed all the html of this view just to print plain text but the same
  • I've already removed all functionality from the controller just to render the view, but the same
  • I have already changed the route and controller name, but the same

I've tried a lot of things but the problem still persists and only this is displayed in the log of my server block:

Nginx server block error log

2015/08/05 08:25:42 [error] 2423#0: *885 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 187.189.190.62, server: stage.mywebsite.com, request: "GET /business/user/site.com/edit HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "stage.mywebsite.com", referrer: "http://stage.mywebsite.com/business"

      

Php-fpm error log

[05-Aug-2015 08:25:42] WARNING: [pool www] child 6825 exited on signal 11 (SIGSEGV) after 28731.872473 seconds from start

      

[05-Aug-2015 08:25:42] NOTICE: [pool www] baby 12469 started

And that's all

Now I am going to show you my nginx configurations for the block and nginx.conf

nginx.conf

user nginx;
worker_processes 1;
worker_rlimit_nofile 1024;

pid        /var/run/nginx.pid;
error_log  /var/log/nginx/error.log;


events {
  worker_connections 1024;
}

http {
  include       /etc/nginx/mime.types;
  default_type  application/octet-stream;

  access_log  /var/log/nginx/access.log;

  sendfile    on;

  server_tokens on;

  types_hash_max_size 1024;
  types_hash_bucket_size 512;

  server_names_hash_bucket_size 64;
  server_names_hash_max_size 512;

  keepalive_timeout  65;
  tcp_nodelay        on;

  gzip         on;
  gzip_disable "MSIE [1-6]\.(?!.*SV1)";


  include /etc/nginx/conf.d/*.conf;
  include /etc/nginx/sites-enabled/*;
}

      

Nginx server

server {
  listen *:80;
  server_name           stage.mywebsite.com;

  root /var/www/website_stage/current/src/public/;
  set $maintenance "off";
  if ($maintenance = "on") {
      return 503;
  }
  index  index.php;

  access_log            /var/log/nginx/stage.mywebsite.com.access.log combined;
  error_log             /var/log/nginx/stage.mywebsite.com.error.log;

  location ~ \.php$ {
    root          /var/www/website_stage/current/src/public/;
    include       /etc/nginx/fastcgi_params;

    fastcgi_pass  127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_index index.php;
  }

  location / {
    root      /var/www/website_stage/current/src/public/;
    rewrite ^/(.+)/$ /$1 permanent;
    try_files $uri $uri/ /index.php?query_string;
  }
}

      

I am using Nginx 1.8 on CentOS 7.

Hope you can help me.

+3


source to share





All Articles