connect() fails with error "(91: Protocol wrong type for socket)" i use nginx 1.4.1 with lua module version 0.82 and lua on system ver 5.1.4, on CentOS linux version 6.3 LUA code in nginx.conf: --------------------------------- location /uds { content_by_lua ' local sock = ngx.socket.udp() local ok, err = sock:setpeername("unix:/tmp/testSocby gadh - Nginx Mailing List - English
i found the bug - the web server returned in "Content-Type" header just "text/html" and not added "charset=UTF-8". why text/html is not enough ?by gadh - Nginx Mailing List - English
when i use nginx 1.4.1 + 'gzip on', once in every 2 requests i get the index.php (which its output is text/html) being downloaded by the browser as unknown file type instead of displayed in it (the broswer displays the "download & save" window and writes in this window that its content type is 'application/octet-stream') after i download it (firefox saves it with file extension 'parby gadh - Nginx Mailing List - English
thanks, where can i see the API changes between 1.2.x and 1.3.x ? i currently use subrequest in 1.2.8 and in 1.3.16 the filter module is not called and the browser waits forever (so it does not go to backend also)by gadh - Nginx Mailing List - English
in my nginx, compiled with my modules, i see that under every day usage (its on a web site , i cannot reproduce this in my lab) the memory usage of nginx grows all the time, it has many open connections (but the total number of connections is high but stays roughly the same over time) and aftert a week or so it consumes about 7GB of ram so i have to reload its processes (8 cores = 8 nginx workersby gadh - Nginx Mailing List - English
i know that 1.3.x is development version, but is it stable enough to be used in production? as stated here: http://forum.nginx.org/read.php?2,221377,221390#msg-221390 Tell me if i figured that right : if the 1.2.x is based on 1.2.0 - then its basic functionality is about 1 year old, and the main changes in it are bug fixes and few features taken from 1.3 after thorough testing ? My main goaby gadh - Nginx Mailing List - English
I'm trying to hold a client request to backend (not go to the server yet), issue an upstream request to another server, then parse the upstream response, store it in my orig. request ctx, only then go to backend server (original request), and in the output filter inject some of the ctx data i stored before - to the backend response. i tried to do all that with a subrequest but then Maxim told mby gadh - Nginx Mailing List - English
after a few addons to the code - in totally irrelevant places - the error returns so it did not help. Now i try to create a new upstream handler so i can use it instead of the subrequest model. i described the model i work in the first post above. let me add this: in my first tests of the upstream - i cannot get to the backend server at all - i just get the upstream response and nginx passby gadh - Nginx Mailing List - English
i changed to pcalloc as you told me and the crash seems to be solved !! thanks alot Gadby gadh - Nginx Mailing List - English
> Note though, that by changing headers_in structure you are > responsible for it's consistency. It's usually much better idea > to use upstream functionality to create needed request to an > upstream instead (proxy_set_body, proxy_pass_headers and so on). > but can i wait for the upstream to return and delay the request from passing on to backend as i do in my subrequesby gadh - Nginx Mailing List - English
thanks Maxim ! i very appreciate your help on this. about the temp file - i protect from a response to be written to a file by knowing the max size that can be sent by the server and enlarging the proxy buffers accordingly. i know i ruin the original request header - its the main purpose for my code ! i want to issue an independant subrequest to another server, no to to the original. but the r-&by gadh - Nginx Mailing List - English
more info: when i use "ignore client abort = on" , the crash happens when the client aborts the connection, BEFORE my subrequest handler is called, so its unlikely this code causes the crash. also, i send the subrequest to a configured url named "aaa_post/" which uses the proxy module to send it to other server.by gadh - Nginx Mailing List - English
Ok, i'll attach my calling to subrequest code, its working flawlessly except the case i reported here: //------------------------------------------------------------------ /* Note: the purspose of this code is to call a handler module (at rewrite phase), send special POST subrequest to another server (independant of the main request), wait with the module untill subrequest finishes, process itsby gadh - Nginx Mailing List - English
thanks after i get the subrequest response in a handler function i registered, what can i do in order to tell the ngin core the subrequest had finished ? in my case i do only these actions: ngx_http_core_run_phases(r->main); return NGX_OK; is this ok ? BTW, its not a case of a client body, i'm talking about GET requests also that get crashed, not POST.by gadh - Nginx Mailing List - English
i attache here my "debug_http" log - note that "http finalize request" is called twice (i think that one of them nulls the connection so nulls its log too), and thats NOT happening when NOT using proxy_ignore_client_abort: btw: i use proxy http version 1.1, if it helps ------------------------------- 2013/03/14 17:49:23 29550#0: *55 client prematurely closed connectionby gadh - Nginx Mailing List - English
i use nginx ver 1.2.5 (also tried 1.2.7) with my module that sends subrequest to an upstream, waits untill response get back, then goes to backend upstream and fetch the regular web page from it. when i add to nginx conf "proxy_ignore_client_abort on;", nginx crash with signal 11 (seg fault) when i do "ab" test and stop it in the middle of the (log: "client prematurely clby gadh - Nginx Mailing List - English
i think i found the source of the crash - i often hibernate my vbox (virtual machine) and also my ubuntu (the host machine) so it appears that the memory was garbaged. after revooting only the vnox all is normal now, no crash. the one thing i cuold not understand is why i got the crash only when using Chromium and not in other browsers ?by gadh - Nginx Mailing List - English
i found that in some cases of the crash, the source of th crash was that nginx pnalloc() returned invalid ptr address 0x6632333834643264 <Address 0x6632333834643264 out of bounds> i use 64 bit system, but all of my pointers are in the 32 bits bounds. is it related to the c/c++ code sharing ? any help please ?by gadh - Nginx Mailing List - English
forgot to add my nginx version: 1.2.5by gadh - Nginx Mailing List - English
i could not find the cause that only when using Chromium i get a crash but when using Firefox i never don't. some hints to the nginx experts that might help: 1. i use my handler module + filter module. (when module is disabled - no crash) 2. i use C++ code in shared lib and sometimes the crash is in the c++ object deconstructor . the object is allocated on the stack (not ptr, just regular declaby gadh - Nginx Mailing List - English
could you tell me where i can find (in the nginx code ) the table size of the open sockets/connections ? maybe its relatedby gadh - Nginx Mailing List - English
if i want to send you a some source files, to which email to send ?by gadh - Nginx Mailing List - English
hi maxim since i cannot send you my code for now, could you point me to the reason/s to the lack of resources, so i can search for a solution ? can you suggest on a monitoring/debug tool that can help ? (valgrind could not find any specific problem rather than the regular notes on the nginx core code, which BTW i suggest to monitor)by gadh - Nginx Mailing List - English
thanks for the fast reply, Maxim the code is complicated and i cannot send it all. more info: when i set the proxy_connect_timeout from default 60s to 2s (the upstream server is close enough) , i could see that in the hang state, all workers were waiting for an answer from the upstream server (thru the proxy) and after that the nginx hanged (so lack of resources also occurs after the timeout)by gadh - Nginx Mailing List - English
I'm developing a module that uses a handler module and header+body filter module at my handler phase (registered in the nginx rewrite phase) i stop the request (return NGX_OK), then issue a subrequest to another server, get the result back (hook function), then continue to the header+body filter, change the headers + body and calls the next filters accordingly. also, the subrequest runs thru a proby gadh - Nginx Development
addon: the stuck occurs right after the last (~18600) subrequet has been sent to the server def1)by gadh - Nginx Mailing List - English
I'm developing a module that uses a handler module and header+body filter module at my handler phase (registered in the nginx rewrite phase) i stop the request (return NGX_OK), then issue a subrequest to another server, get the result back (hook function), then continue to the header+body filter, change the headers + body and calls the next filters accordingly. also, the subrequest runs thru a pby gadh - Nginx Mailing List - English
currently develops nginx module for web security company how can i get a write permission in the developers forum ? (to post new msg) tnx gadby gadh - New Member Introductions