Hello,
we are having trouble with “large” file uploads…
The issues occour when uploading files larger than 10MB.
The uploading takes place, but when the uploading is complete I get the
message:
- The page you are looking for is temporarily unavailable.
- Please try again later.
And the entry in the log file:
- 2008/06/08 00:13:14 [error] 13013#0: *19 upstream timed out (60:
Operation timed out) while sending request to upstream, client:
193.95.238.59, server: new.smej.se, request: “POST /savefile.i - -
HTTP/1.1”, upstream: “fastcgi://unix:/tmp/ng.php:”, host: “new.smej.se”,
referrer: “This domain has been registered for a customer by nicsell”
I’ve set the client_max_body_size to 300m, but it did’t solve the
problem.
Any suggestions?
This is my config:
user www;
worker_processes 2;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
optimize_server_names off;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local]
$request ’
'“$status” $body_bytes_sent “$http_referer” ’ ‘“$http_user_agent”
“$http_x_forwarded_for”’;
access_log logs/access.log main;
sendfile on;
tcp_nopush on;
# client_body_timeout 1200;
tcp_nodelay off;
# send_timeout 30m;
keepalive_timeout 65;
# client_header_timeout 500;
client_max_body_size 300m;
gzip off;
server {
# proxy_next_upstream error;
# client_body_timeout 1200;
# proxy_read_timeout 1200;
# client_max_body_size 300m;
# fastcgi_read_timeout 1200;
listen 80;
server_name new.smej.se;
root /www/new.smej.se/html;
location ~ \.flv$ {
flv;
}
#access_log logs/host.access.log main;
location = / {
#root html;
index index.html index.i index.htm index.php;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
location ~ \.(php|mex|i)$ {
fastcgi_pass unix:/tmp/ng.php;
fastcgi_index index.i;
fastcgi_param SCRIPT_FILENAME
/www/new.smej.se/html$fastcgi_script_name;
include fastcgi_params;
}
location ~ /.ht {
deny all;
}
}
–
iDEV, podjetje za spletne storitve, d.o.o.
Tomaž Marhat, CEO
Brda 15A
SI-2383 Å martno pri Slovenj Gradcu
SLOVENIA - EU
Web: http://idev.si/
VAT #: SI43028195
Company ID #: 2346265
Mobile #: +386 70 819 789
On Don 12.06.2008 12:06, iDEV d.o.o. wrote:
And the entry in the log file:
- 2008/06/08 00:13:14 [error] 13013#0: *19 upstream timed out (60:
Operation timed out) while sending request to upstream, client:
193.95.238.59, server: new.smej.se, request: “POST /savefile.i - -
HTTP/1.1”, upstream: “fastcgi://unix:/tmp/ng.php:”, host: “new.smej.se”,
referrer: “This domain has been registered for a customer by nicsell”
what are the values of the variables?
http://www.php.net/manual/en/features.file-upload.php
Have you a error massege in the backend?
Hth
Aleks
Its quite strange… sometimes the uploading is complete, and sometimes
I
get the previosly mentioned message:
The page you are looking for is temporarily unavailable.
Please try again later.
But if everything goes OK, I print out the $_POST and $_FIlES:
Array ( [catID] => 1 [MAX_FILE_SIZE] => 314572800 [title] => Futurama
05x01
Sample [tags] => futurama, risanka, vesolje, znanstvena
fantastika ) Array ( [file] => Array ( [name] =>
futurama.5x01.crimes_of_the_hot.dvdrip_xvid-sample-fov.avi [type] =>
video/x-msvi
deo [tmp_name] => /tmp/phpp0HXT5 [error] => 0 [size] => 13152256 ) )
But in about 90% of all tries, the uploading fails. Any ideas why?
On Thu, 12 Jun 2008 12:27:00 +0200, Aleksandar L. [email protected]
wrote:
Have you a error massege in the backend?
Hth
Aleks
–
iDEV, podjetje za spletne storitve, d.o.o.
Tomaž Marhat, CEO
Brda 15A
SI-2383 � martno pri Slovenj Gradcu
SLOVENIA - EU
Web: http://idev.si/
VAT #: SI43028195
Company ID #: 2346265
Mobile #: +386 70 819 789
maybe try setting it to 350m?
maybe -exactly- 300m is cutting it too close with header info/etc.
The files I’m trying to upload are 12MB and 19MB.
And I tried setting it to 350m, and uploading is still not working.
I tried adding:
proxy_read_timeout 1600;
fastcgi_read_timeout 30m;
to the confing file, but unfortunately it has not solved my problem.
On Tue, 17 Jun 2008 16:44:37 -0700, mike [email protected] wrote:
The page you are looking for is temporarily unavailable.
The issues occour when uploading files larger than 10MB.
193.95.238.59, server: new.smej.se, request: "POST /savefile.i - -
Hth
Web: http://idev.si/
–
iDEV, podjetje za spletne storitve, d.o.o.
Tomaž Marhat, CEO
Brda 15A
SI-2383 � martno pri Slovenj Gradcu
SLOVENIA - EU
Web: http://idev.si/
VAT #: SI43028195
Company ID #: 2346265
Mobile #: +386 70 819 789
I solved the problem by binding php-fcgi to 127.0.0.1 port 7777,
I have no idea why it didn’t work on unix socket.
On Wed, 18 Jun 2008 02:01:01 +0200, iDEV d.o.o. [email protected] wrote:
maybe -exactly- 300m is cutting it too close with header info/etc.
But if everything goes OK, I print out the $_POST and $_FIlES:
the
referrer: “This domain has been registered for a customer by nicsell”
–
Mobile #: +386 70 819 789
–
iDEV, podjetje za spletne storitve, d.o.o.
Tomaž Marhat, CEO
Brda 15A
SI-2383 � martno pri Slovenj Gradcu
SLOVENIA - EU
Web: http://idev.si/
VAT #: SI43028195
Company ID #: 2346265
Mobile #: +386 70 819 789
ahh - i’ve seen a lot of issues with people and fastcgi via socket.
i’ve always ran TCP even on localhost, too many random issues and
complaints from people.
glad it’s solved!
Might be something with the FreeBSD implementation of unix sockets,
if I recall correcly I had some problems with memcache on unix socket,
and they went away as soon as I changed to TCP.