1

I have been trying to upload a csv file through backend dashboard of my laravel site, but it's throwing an error , 504 gateway Timeout nginx . (This works perfectly in staging)

While looking for the solution, I have updated the following parameters.

In php.ini --->

  • post_max_size
  • upload_max_filesize
  • max_execution_time
  • max_input_time

In nginx config --->

  • fastcgi_read_timeout
  • client_max_body_size
  • send_timeout
  • keepalive_timeoutenter image description here

While checking nginx /php logs its not showing any errors in logs , and also I have tried enabling slow logs, but still it doesnt show any errors.

Can anyone help me with this issue.

        location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_read_timeout 1000s;
    client_max_body_size   100M;
    send_timeout 1000;
    keepalive_timeout  1000;
N69S
  • 16,110
  • 3
  • 22
  • 36
Thejus A P
  • 71
  • 1
  • 11
  • have you tried uploading an empty csv file before increasing the parameters ? – N69S Jul 09 '21 at 13:08
  • How do you use PHP on your webserver? If you're using PHP-FPM for example, I would advise to restart the FPM server process if you haven't done that already. – Eric Landheer Jul 09 '21 at 13:18
  • I am using php fpm and i have restarted it after changes.Same applies for nginx – Thejus A P Jul 09 '21 at 13:30
  • In the staging , its a 5mb file and it tooks approximately 5 m inutes to upload, hence according to that only , parameters are set here – Thejus A P Jul 09 '21 at 13:32

0 Answers0