Comments (8)
Update: I just became a bit desperate and installed another VMware with Archlinux 64bit - did a clean setup with nginx 1.0.4 and the modules - and it worked!
So the fault has to be somewhere in the 32bit <-> 64bit difference which is very strange :(
from lua-nginx-module.
On Tue, Jun 21, 2011 at 8:44 PM, moodydeath
[email protected]
wrote:
At first: I still don't know, where the error is coming from exactly.
When doing a post-request with data to php-scripts via ngx.location.subrequests the fastcgi processing has a timeout (504 for the client then) like:
Thanks for the detailed information. I don't see any clue in the debug
log. Could you please dump out the fastcgi request headers on the php
side? It seems that php is waiting for something that will never
arrive. Debugging on the php side should be easier.
Thanks!
-agentzh
from lua-nginx-module.
On Wed, Jun 22, 2011 at 4:22 PM, agentzh [email protected] wrote:
Thanks for the detailed information. I don't see any clue in the debug
log. Could you please dump out the fastcgi request headers on the php
side? It seems that php is waiting for something that will never
arrive. Debugging on the php side should be easier.
Also, using the strace utility to check what the php-fpm process is
doing during the hang will be very helpful too :)
-agentzh
from lua-nginx-module.
Hi, i just straced php-fpm with 1 chidprocess on the 64bit and 32bit installation with the test-scripts from the post above.
Here's the failing 32bit one: http://pastebin.com/BHYRBQD3
And the working 64bit version: http://pastebin.com/9i7fTfG1
Currently compiling php and php-fpm with debug-mode... will take some time, but i will post the results, then, too :-)
Thanks!
moody
from lua-nginx-module.
Feeling kind of stupid because i can't find a log-file produced by php or php-fpm where the content of the requests is logged. (the only thing i can produce are php-scripts which have the request-headers as output, but they are the same for 64bit and 32bit - and i won't really rely on them to be correct and that it contains everything)
but i think there could be a hint in the 32bit-log from strace:
[pid 10750] write(3, "\1\6\0\1\0007\1\0X-Powered-By: PHP/5.3.6\r"..., 80) = -1 EPIPE (Broken pipe)
[pid 10750] --- {si_signo=SIGPIPE, si_code=SI_USER, si_pid=10750, si_uid=1000} (Broken pipe) ---
from lua-nginx-module.
On Wed, Jun 22, 2011 at 9:28 PM, moodydeath
[email protected]
wrote:
Hi, i just straced php-fpm with 1 chidprocess on the 64bit and 32bit installation with the test-scripts from the post above.
Here's the failing 32bit one: http://pastebin.com/BHYRBQD3
I cannot tell what syscall php-fpm is block upon from this complete
strace dump. What is the last syscall when the hang is actually
happening? Is it this one?
[pid 10750] read(3, <unfinished ...>
Could you print out the Content-Length header in your php script (you
can temporarily remove the body reading section from your .php
script)?
I wonder if the Content-Length header takes a value larger than 3 :)
Thanks!
-agentzh
from lua-nginx-module.
On Tue, Jun 21, 2011 at 8:44 PM, moodydeath
[email protected]
wrote:
I don't know what could cause this - The machines are theoretically the same! (Besides one is 32bit and one 64bit), all the configuration-files are the same, too.
Okay, the key issue is with "32bit". I've found a bug in ngx_lua that
when running on 32bit systems, it will produce memory invalid writes
(that is, writing a 32-bit size_t to a 64-bit off_t in
ngx_http_lua_adjust_subrequest), which results in erroneously large
Content-Length headers for POST/PUT subrequests. And it will certainly
cause your php-fpm process to hang because the php is expecting a
huge request body which is actually several bytes long.
Could you please try out the latest devel branch of ngx_lua?
Waiting for your feedback on my patch! :D
(It seems that I should have prepared a 32-bit system to test my C code :P)
Thanks!
-agentzh
from lua-nginx-module.
Hi,
sorry - was just about to log the content-length headers when your commit appeared.
I tested the devel-branch on both 32bit installations (Ubuntu 10.04 and ArchLinux) and to be on the safe side even on the ArchLinux64 Machine ;-)
Everything working perfect now!
Thanks,
moody
from lua-nginx-module.
Related Issues (20)
- ngx.say not work
- init_by_lua during Nginx config test HOT 3
- Using outer scope required modules inside an ngx.timer.at handler HOT 4
- when header_filter_by_lua_file run failed. HOT 1
- OpenResty keepalive connection appears to be hung HOT 6
- unexpected phase error when `ngx.send_header()` trigger `if_unmodified` 412 logic HOT 2
- nginx: [emerg] dlopen() "/etc/nginx/ngx_http_naxsi_module.so" failed (/etc/nginx/ngx_http_naxsi_module.so: undefined symbol: pcre_exec) in /etc/nginx/nginx.conf:9 nginx: configuration file /etc/nginx/nginx.conf test failed
- nginx: [emerg] dlopen() "/usr/local/src/nginx-1.26.1/objs/ngx_http_naxsi_module.so" failed (/usr/local/src/nginx-1.26.1/objs/ngx_http_naxsi_module.so: undefined symbol: pcre_exec) in /etc/nginx/nginx.conf:9 HOT 2
- Nginx + LibreSSL (undefined symbol: SSL_client_hello_get0_ext) HOT 3
- Possible to support `tcpsock:receive` in `balancer_by_lua` context?
- `ngx.req.set_body_data` API does not work in `balancer_by_lua` phase HOT 1
- errlog get_logs doesnt get error logs in privileged agent and visa versa HOT 3
- Core dumps with Lua nginx module and OCSP enabled on ingress-nginx HOT 2
- attempt to redefine .. in cdef HOT 1
- New module release HOT 2
- bug: memory leak when collecting response body chunks HOT 1
- ngx_http_lua_module 0.10.27 HOT 12
- Cannot remove headers set with add_header and variable value from map in http block HOT 2
- unreachable code in ngx_http_lua_util HOT 1
- possible multiple redundant comparison of functions return codes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-nginx-module.