timebug / lua-resty-httpipe Goto Github PK
View Code? Open in Web Editor NEWLua HTTP client cosocket driver for OpenResty / ngx_lua, interfaces are more flexible
Lua HTTP client cosocket driver for OpenResty / ngx_lua, interfaces are more flexible
hp.chunk may be hp.chunked?
您好,
我目前有这样一个需求,cdn访问lua,lua从外部连接获取并解析修改数据后返回,我用yum 装的openresty,用ngx.location.capture、resty.http和您这个插件,程序运行2小时左右,四个work的CPU都会升到50%左右,随着时间的推移,CPU到100%,请问这大概是什么原因?我还有一个程序是访问内部链接(127.0.0.1)没有这个问题。
我的并发200左右,并且一直保持这个数,CPU负载上升应该和并发没关系。
here https://github.com/timebug/lua-resty-httpipe/blob/master/lib/resty/httpipe.lua#L142 maybe forgot the self.port ?
should also check if sock is req-socket
in read_eof
function, for
get_body_reader
will call read_eof
function in line 720, and if state is read_eof
, it will try to setkeepalive on a req-socket
which is forbidden. the runtime error traceback like below:
2018/04/12 16:30:50 [error] 30699#0: *2621 lua entry thread aborted: runtime error: /home/vagrant/shanks/nginx//app/lib/resty/httpipe.lua:516: attempt to call method 'setkeepalive' (a nil value)
stack traceback:
coroutine 0:
/home/vagrant/shanks/nginx//app/lib/resty/httpipe.lua: in function 'set_keepalive'
/home/vagrant/shanks/nginx//app/lib/resty/httpipe.lua:549: in function 'read'
/home/vagrant/shanks/nginx//app/lib/resty/httpipe.lua:730: in function 'reader'
Is there any plan for this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.