Welcome! Log In Create A New Profile

Advanced

Failed - Network Error When Downloading SMALL Files

Posted by Namone 
Failed - Network Error When Downloading SMALL Files
November 27, 2017 05:28PM
Hi everyone,

I am about at my wits end with this problem.

We have a web application (written in PHP w/ Laravel) and a major feature of this application is to export a list of residents from properties. MOST properties do export and the CSV downloads successfully.

However, for large properties, it fails after ~60 seconds. I have attempted to change the settings to increase the timeout times in NGINX and the php.ini, but nothing seems to fix the issue. The files are only 50kb, or so, but the script takes a good amount of time to process and generate the CSV.

Every property works on my local development environment - so I know the code is functional.

My NGINX config (I am using Laravel Forge):

===================================
# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/{site_name}/before/*;

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name default;
root /home/forge/{site_name}/current/public;

# FORGE SSL (DO NOT REMOVE!)
ssl_certificate /etc/nginx/ssl/{site_name}/273139/server.crt;
ssl_certificate_key /etc/nginx/ssl/{site_name}/273139/server.key;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!3DES';
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/dhparams.pem;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

index index.html index.htm index.php;

charset utf-8;

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/{site_name}/server/*;

location / {
try_files $uri $uri/ /index.php?$query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }

access_log off;
error_log /var/log/nginx/{site_name}-error.log error;

error_page 404 /index.php;

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_read_timeout 120;
}

location ~ /\.(?!well-known).* {
deny all;
}
}

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/{site_name}/after/*;

===================================

And my PHP.ini:

===================================
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 300

; Maximum request time before termination
request_terminate_timeout = 300s

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 60

===================================



Edited 1 time(s). Last edit at 11/27/2017 05:29PM by Namone.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 259
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready