Thanks :) On 01/11/2013 12:51 PM, Maxim Dounin wrote: > Hello! > > On Fri, Jan 11, 2013 at 11:56:15AM +0200, Anatoli Marinov wrote: > >> Hello colleagues, >> I am wondering is there an way to order function calls for rewrite phase. >> For example I have 3 modules that may reject request and all they >> register a function for request rewrite phase. >> Theby toli - Nginx Development
Hello colleagues, I am wondering is there an way to order function calls for rewrite phase. For example I have 3 modules that may reject request and all they register a function for request rewrite phase. The modules are A, B and C. From log messages I can see that the function are called in "unordered" way for example B, C, A. How can I order the calls to A, B, C ? Thanks in advancby toli - Nginx Development
Hello Colleagues, I am wondering is there a method for shared dictionary locking. In my script I have to flush all records from the dictionary and after that the script will put new records. In this time I do not want other workers to read the partially loaded dictionary. So is it possible to lock it for a very small period of time? Thanks in advance Anatoli Marinov __________________________by toli - Nginx Development
What do you exactly mean with "dynamic configuration"? I cannot find anything about it ... On 11/25/2012 12:55 PM, Maxim Dounin wrote: > Hello! > > On Fri, Nov 23, 2012 at 05:53:53PM +0200, Anatoli Marinov wrote: > >> *Hello colleagues, >> We have some troubles when nginx have to reload its configuration. >> *There is a*control panel and every user which haby toli - Nginx Development
Very strange alignment :) sorry for that .... On 11/23/2012 05:53 PM, Anatoli Marinov wrote: > *Hello colleagues, > We have some troubles when nginx have to reload its configuration. > *There is a*control panel and every user which has account may change > its own settings. For example it may add new domain name or change > other option. After that new config files are created aby toli - Nginx Development
*Hello colleagues, We have some troubles when nginx have to reload its configuration. *There is a*control panel and every user which has account may change its own settings. For example it may add new domain name or change other option. After that new config files are created and they are sent to the servers. When there is a new config file master process receives HUP signal and it loads thisby toli - Nginx Development
Thanks Maxim, You are right. The following patch is enough: --- src/http/ngx_http_upstream.c +++ src/http/ngx_http_upstream.c @@ -2687,7 +2687,8 @@ tf = u->pipe->temp_file; - if (u->headers_in.content_length_n == -1 + if ((u->headers_in.content_length_n == -1 + && !u->headers_in.chunked)by toli - Nginx Development
This patch is for 1.2.4. It adds some code that checks if the file is complete when Transfer-Encoding: chunked is used. --- nginx-1.2.4/src/http/modules/ngx_http_proxy_module.c 2012-04-23 13:40:01.000000000 +0300 +++ nginx-1.2.4_patched/src/http/modules/ngx_http_proxy_module.c 2012-10-30 14:55:24.106188123 +0200 @@ -1867,7 +1867,7 @@ return rc; done: + r->upstream->chunked_cby toli - Nginx Development
Probably the issue is in my test bed. Sorry. On 10/25/2012 11:47 AM, Anatoli Marinov wrote: > Hello, > Last week I had some issues with wrongly cached files without > Content-Length. Now I'm playing with Transfer-Encoding: chunked. > > Nginx configured with proxy_cache don't cache objects that have > Transfer-Encoding: chunked. > Is it normal behaviour or there is a misconfiby toli - Nginx Development
Hello, Last week I had some issues with wrongly cached files without Content-Length. Now I'm playing with Transfer-Encoding: chunked. Nginx configured with proxy_cache don't cache objects that have Transfer-Encoding: chunked. Is it normal behaviour or there is a misconfiguration in my test bed? Thanks _______________________________________________ nginx-devel mailing list nginx-devel@nginx.by toli - Nginx Development
*Hello colleagues, I have some troubles when caching (with proxy cache) some objects which don't have content-length header. It happens with gzipped .js or .css files. Usually these files don't have content-length because its size is not known when headers are sent. If the connection between proxy server and origin behind it disconnects during file transfer the file will be checked if it hasby toli - Nginx Development
Thank you very much Maxim! On 09/20/2012 04:17 PM, Maxim Dounin wrote: > Hello! > > On Thu, Sep 20, 2012 at 12:31:12PM +0300, Anatoli Marinov wrote: > > [...] > >> And this seems to work but 302 answer has a body and it is a chunked >> response? > This is because you said it to. > >> Is it possible to send it without body. > No, it's not allowed by aby toli - Nginx Development
I tried to send my buffer with a message and the code looks like this: static ngx_int_t ngx_http_my_handler(ngx_http_request_t *r) { header = ngx_list_push(&r->headers_out.headers); if (header == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } header->value.len = strlen("http://new_location.com/1.dat"); header->value.data = ngx_pcallocby toli - Nginx Development
Hello Colleagues, Which is the right way to redirect user request from handler module. Now I have something like this in my handler: My handler function(r) { header = ngx_list_push(&r->headers_out.headers); header->key.len = sizeof("Location") - 1; header->key.data = (u_char *) "Location"; header->value.len = strlen("http://new_locatiby toli - Nginx Development
"Must" is not a good reason. Is there a case that requires this behavior. In my use case I use internal redirects from location A to location @B. In location @B I try to read an exported variable which is actually located in module context and the module set this variable in location A but in @B all previous contexts are missing and I lost all previously set states and variables. Whby toli - Nginx Development
Hello Mates, I am wondering why in ngx_http_named_location is used a segment of code that resets all modules contexts. I mean the line ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module);. My opinion is that the module context should not be touched outside of the certain module. Is there a special reason for this patch? Is there a case which requires it? Thanks in advance Anatoli Maby toli - Nginx Development
I have custom logs and in the log file I see that rewrite phase passes successful and also there I see that context is created and attached in the request. On 07/11/2012 07:08 PM, Valentin V. Bartenev wrote: > On Tuesday 10 July 2012 15:53:34 Anatoli Marinov wrote: > >> I think I have only 1 request without any sub requests and also do not >> use internal redirects. >&by toli - Nginx Development
I think I have only 1 request without any sub requests and also do not use internal redirects. On 07/10/2012 01:24 PM, Valentin V. Bartenev wrote: > On Tuesday 10 July 2012 14:17:11 Valentin V. Bartenev wrote: > >> On Tuesday 10 July 2012 12:31:45 Anatoli Marinov wrote: >> >>> Hello Colleagues, >>> I am working on a project, that uses nginx as http pby toli - Nginx Development
Hello Colleagues, I am working on a project, that uses nginx as http proxy and I have written many nginx modules. For several months till now I am looking for a bug in one of my modules but I cannot find it. It appears very rare but even so it should be fixed. I added many log messages to debug the issue. I found that some time the module context is null even it has been set before. I am usiby toli - Nginx Development
Hello Colleagues, I am working on a patch for upstream and proxy_cache that should serve files not only from cache dir but also from tmp dir. At the moment I can send only first 114,327 bytes from file in tmp dir. Its size is more than 1 MB. The code is: check the file is in tmp dir if it is call : ngx_int_t ngx_http_tmp_send(ngx_http_request_t *r) { ngx_int_t rc; ngx_buf_tby toli - Nginx Development
Hello, I am going to try to produce a solution for the issue I did post yesterday. It was about proxy_cache and 1000 requests for non-cached big object. There is suboptimal behavior and the object will be downloaded many times before been cached. So I need a direction. At the moment I am digging in the source..... Most of the the code which have a deal with caching is located in ngx_http_fileby toli - Nginx Development
Hello, See my answer below. On 01/12/2012 02:34 PM, Maxim Dounin wrote: > Hello! > > On Thu, Jan 12, 2012 at 11:49:23AM +0200, Anatoli Marinov wrote: > > >> I know this configuration variable. It has been added by Maxim last >> mouth in unstable (as i remembered but I am not absolutely sure). It >> seem to be a workaround and will not solve the problem. I thinby toli - Nginx Development
Yes I can pre-fetch the sets but it also is an workaround and it requires time for pre-fetching. Currently I am working to get this approach on. On 01/12/2012 02:30 PM, António P. P. Almeida wrote: > On 12 Jan 2012 09h49 WET, toli@webforge.bg wrote: > > >> I know this configuration variable. It has been added by Maxim last >> mouth in unstable (as i remembered but I amby toli - Nginx Development
I know this configuration variable. It has been added by Maxim last mouth in unstable (as i remembered but I am not absolutely sure). It seem to be a workaround and will not solve the problem. I think it is unusable. If we use it for the same case: In first 1 second A receives 1000 requests. Only 1 request will be send to B, for first request that A receives. The others 999 will wait for exaby toli - Nginx Development
Hello Colleagues, I found a performance issue with proxy_cache module. For example I have installed 2 servers with nginx-1.0.10. First one(A) works as a reverse proxy and the second one(B) is a storage with many big files -- 1GB -- 2GB. The link between A and B for example may serve 1 MBps. There is a new object on B and it is not yet cached on A. Let we assume this is a hot new object andby toli - Nginx Development
Ok. I am going to try the second approach also. With the patch from the first approach the issue does not appear anymore. Even so you are right, it is not optimal. On 09/30/2011 01:28 PM, Maxim Dounin wrote: > Hello! > > On Fri, Sep 30, 2011 at 12:24:13PM +0300, Anatoli Marinov wrote: > >> There found 2 solutions for this: >> 1. In ngx_http_file_cache_update the call of &by toli - Nginx Development
There found 2 solutions for this: 1. In ngx_http_file_cache_update the call of ngx_shmtx_lock(&cache->shpool->mutex); may be moved before rc = ngx_ext_rename_file(&tf->file.name, &c->file.name, &ext); I should work but there will be another syscall when the resource is locked. 2. When cache file is read from cache directory its binary header may be compared withby toli - Nginx Development
I invested more time to investigate the issue and I found something. Let's assume there is 2 nginx workers with pids 6362 and 6364 (they are actually 4 but only these 2 are interested). There are 3 parallel requests 10102, 10188 and 10232 for one and the same file. See the scenario. It describes the issue: --- context switch to 6362--- 6362 - 10102 - begin (connection accepted) 6362 - 10102 -by toli - Nginx Development
Thank you M-r Dounin, The attached file is the cached entry which I have. The file is different from the one in log file but the behaviour is the same. Today I have 4 return codes with 0 and all of them are only for this file! What should be wrong? Please advise me where I may add more log messages to isolate the issue. If I found the reason I will be able to fix it. Thanks in advance. Anatoliby toli - Nginx Development
Hello colleagues, Last week I wrote a module that generates custom access log and in general it works fine. I found several records with status core 0. In my test bed I have clear nginx 1.0.4 installation with configured proxy_cache. The instance is used as a reverse proxy. I found a strange case when in the log phase my log module receives r->headers_out.status == 0, r->connection->sby toli - Nginx Development