Welcome! Log In Create A New Profile

Advanced

upload + fastcgi = cache?

November 09, 2009 04:35PM
есть конфиг nginx:
worker_processes 5;
worker_rlimit_nofile 65535;

events {
use epoll;
worker_connections 10240;
}

http {
include mime.types;
default_type application/octet-stream;
charset UTF-8;

access_log off;
sendfile on;
server_names_hash_bucket_size 64;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;

gzip on;
gzip_min_length 1024;
gzip_buffers 12 32k;
gzip_types application/xml text/css application/x-javascript;

client_header_buffer_size 4k;
large_client_header_buffers 4 4k;
output_buffers 4 32k;

..... (описание виртуальных серверов) ....

location / {
fastcgi_pass localhost:8867;
fastcgi_index index.html;
include fastcgi_params;
keepalive_timeout 0;
}


+ есть стандартная форма аплоада файлов:
<form action="..." method="post" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="image" src="..." />
</form>

При отправке запроса - обработчиком выступает perl скрипт с FCGI + FCGI::ProcManager

Файлы через форму отправляются громадные (2-3 Гб, например).
Перл скрипт читает из STDIN до CONTENT_LENGTH


Проблемы собственно две:
1. Когда файл большой - аплоадинг просто прекращается через определенное время (примерно 20-30 секунд после старта) - как этого избежать?
2. Когда файл маленький (успевает закачаться за этот период) - все равно сначала nginx полностью получает его, а только после этого передает fastcgi скрипту. Надо, чтобы скрипт получал контент по мере отправки его клиентом (для реализации прогрессбара). Как это можно реализовать?

Заранее благодарен за ответы.
Subject Author Posted

upload + fastcgi = cache?

wasiliy November 09, 2009 04:35PM

Re: upload + fastcgi = cache?

Andrey Zloy November 09, 2009 05:28PM

Re: upload + fastcgi = cache?

wasiliy November 09, 2009 05:33PM

Re: upload + fastcgi = cache?

Dmitry Dedukhin November 10, 2009 03:58AM

Re: upload + fastcgi = cache?

wasiliy November 10, 2009 06:09AM

Re: upload + fastcgi = cache?

Dmitry Dedukhin November 10, 2009 06:40AM

Re[2]: upload + fastcgi = cache?

Sergey Bondari November 10, 2009 07:32AM

Re: Re[2]: upload + fastcgi = cache?

wasiliy November 10, 2009 08:26AM

Re[4]: upload + fastcgi = cache?

Sergey Bondari November 10, 2009 09:08AM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 10, 2009 10:40AM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 11, 2009 07:14AM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 11, 2009 07:31AM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 11, 2009 08:04AM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 11, 2009 08:18AM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 12, 2009 12:56PM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 13, 2009 03:30AM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 13, 2009 03:40AM

Re: Re[4]: upload + fastcgi = cache?

Valery Kholodkov November 11, 2009 06:16AM

Re: Re[4]: upload + fastcgi = cache?

Alexandr Kutuzov November 11, 2009 06:42AM

Re[6]: upload + fastcgi = cache?

Sergey Bondari November 11, 2009 06:46AM

Re: Re[4]: upload + fastcgi = cache?

Alexandr Kutuzov November 11, 2009 08:24AM

Re: Re[4]: upload + fastcgi = cache?

Valery Kholodkov November 11, 2009 09:22AM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 11, 2009 11:35AM

Re: Re[4]: upload + fastcgi = cache?

Valery Kholodkov November 12, 2009 10:42AM

Re: Re[4]: upload + fastcgi = cache?

Alexandr Kutuzov November 13, 2009 04:42AM

Re: Re[4]: upload + fastcgi = cache?

wasiliy November 13, 2009 06:16AM

Re: Re[4]: upload + fastcgi = cache?

Alexandr Kutuzov November 13, 2009 06:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 240
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready