| From | Sent On | Attachments |
|---|---|---|
| John Moore | Mar 8, 2011 4:07 am | |
| agentzh | Mar 8, 2011 4:19 am | |
| António P. P. Almeida | Mar 8, 2011 10:59 am | |
| John Moore | Mar 9, 2011 10:42 am | |
| Richard Kearsley | Mar 9, 2011 11:15 am | |
| John Moore | Mar 9, 2011 12:39 pm | |
| agentzh | Mar 9, 2011 7:38 pm | |
| agentzh | Mar 9, 2011 7:52 pm | |
| Elena Zwetkow | Mar 10, 2011 12:16 am | |
| agentzh | Mar 10, 2011 12:28 am | |
| Elena Zwetkow | Mar 10, 2011 1:01 am | |
| agentzh | Mar 10, 2011 1:33 am | |
| Alexander Kunz | Mar 15, 2011 3:14 pm | |
| agentzh | Mar 15, 2011 7:28 pm | |
| Alexander Kunz | Mar 16, 2011 12:22 am | |
| agentzh | Mar 16, 2011 12:36 am |
| Subject: | Re: [ANN] ngx_echo v0.35: ability to POST/PUT local files as subrequest bodies | |
|---|---|---|
| From: | agentzh (agen...@gmail.com) | |
| Date: | Mar 10, 2011 12:28:20 am | |
| List: | ru.sysoev.nginx | |
On Thu, Mar 10, 2011 at 4:16 PM, Elena Zwetkow <ezwe...@gmx.de> wrote:
Hello,
could this be a way to put POST multipart uploads to redis/memcache?
Yes :)
I am right, if i use a fileread with lua in nginx the script is blocking?
Yup.
Any ideas how i can store POST multipart uploads nonblocking?
Use echo_subrequest POST /foo -f /path/to/file for that (combined with ngx_upload, maybe).
I know there is a great file upload module for nginx, but what happens if i use
lua to work on an uploaded file like move / rename / copy uploaded files, this
blocks nginx?
Yes. Most disk operations will block nginx (or some other processes like php).
How can i check if something block nginx?
Maybe configure only 1 nginx worker and try
ab -c 100 -n 10000 http://...
and check the results? ;)
There will be a "body_file" option for ngx_lua's "ngx.location.capture" and "ngx.location.capture_multi" Lua functions, similar to echo_subrequest's -f option.
But nginx may also block even if itself does the disk operations.
A work-around is to start a few more nginx worker processes, just like how apache and php-fpm has been doing for years ;)
Cheers, -agentzh
_______________________________________________ nginx mailing list ngi...@nginx.org http://nginx.org/mailman/listinfo/nginx





