Comments (18)
We've been seeing this memory leak in production but hadn't been able to track it down yet.
We're running node 0.3.1 (for at least minimal https support), so that would explain where we don't see it.
Thanks for the heads up and I'll investigate and get back to you.
from node-http-proxy.
Interesting. I ran the same tests using node v0.3.1, with the same results - with the pool error handler in place, memory leaks occur. Without the error handler, it runs like champ under load. :-)
from node-http-proxy.
Nice. Will try siege myself, I'd only been using ab up till now, but this looks wayyy better.
Thanks again.
from node-http-proxy.
I'm having the same issue on 0.3.7, did anyone solve this?
from node-http-proxy.
All,
We will be dropping pool when we upgrade to 0.4.x in the next month or so because node.js > 0.3.6 does connection pooling for us.
In the meantime, let me know how the removal of the pool error handler works in prod. I don't think it's the cause and not handling it can cause uncaught exceptions under high load.
from node-http-proxy.
Hi, what's the status of this bug?.
I'm getting this error, on node 0.4:
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace:
at Pool. (events.js:101:17)
at Object.proxyRequest (/usr/local/lib/node/.npm/http-proxy/0.3.1/package/lib/node-http-proxy.js:185:7)
at Server. (/Users/davem/Petromatch/repository/eclipse/petromatch-java/node/faye-server.js:12:3)
at Server. (/usr/local/lib/node/.npm/faye/0.5.5/package/faye-node.js:1952:22)
at Server.emit (events.js:45:17)
at HTTPParser.onIncoming (http.js:1078:12)
at HTTPParser.onHeadersComplete (http.js:87:31)
at Socket.ondata (http.js:977:22)
at Socket._onReadable (net.js:654:27)
at IOWatcher.onReadable as callback
from node-http-proxy.
oh, and node is definitely leaking.
from node-http-proxy.
Working on a update for node 0.4.0. A lot of this has to do with the pool dependency which we can remove using the http.Agent API in 0.4.0
from node-http-proxy.
thanks, rough eta?
node now at 760 Mb after 6 hours of very light dev testing (couple of connections)
ie: I wouldn't feel comfortable moving to production.
from node-http-proxy.
ps: I also posted this on the node.js google group, and had some interesting replies:
https://groups.google.com/d/topic/nodejs/TbHMjwMdRRY/discussion
from node-http-proxy.
note the following comment regarding the code I posted, which is based on the example in the node.js readme:
https://groups.google.com/d/msg/nodejs/TbHMjwMdRRY/eoDRenX0UCEJ
is it true that every request creates a new proxy which isn't garbage collected?
from node-http-proxy.
It is true that every request creates a new proxy. It is false that it is not garbage collected.
from node-http-proxy.
I replied to the thread here: https://groups.google.com/forum/#!msg/nodejs/TbHMjwMdRRY/eoDRenX0UCEJ
Will try to bang this out in the next week or so.
from node-http-proxy.
I replaced this (which I found on your site):
var server = http.createServer (function (req, res) {
new httpProxy
.HttpProxy (req, res)
.proxyRequest (8080, 'localhost', req, res)
})
with:
var server = httpProxy.createServer (8080, 'localhost')
Functionality is the same, and the leak does seem to be less, but will know later today.
from node-http-proxy.
Have you been following this:
https://groups.google.com/d/msg/nodejs/TbHMjwMdRRY/6YIi6ktiuOEJ
from node-http-proxy.
I ran node-inspector on my code, with v8-profiling.
As far as I can tell, HttpProxy is not being GC'd
Every request increments HttpProxy, ClientRequest and ServerResponse counts.
These counts never decrease, even if the system is left alone for some time.
I have a screen shot of the profiler, though I don't see a way to attached files here, so email me if you want to see the screenshot: dmoshal at gmail dot com.
from node-http-proxy.
I have fixed this issue in the v0.4.0 branch. Unfortunately, it is not stable due to a few bugs in the node.js http.Agent APIs that I am working to resolve.
We will push v0.4.0 when we can get these issues resolved in core; hopefully the aforementioned fixes will make it into 0.4.3
from node-http-proxy.
Thanks, I'm using nginx for now (without websockets)
Dave
On Thu, Mar 10, 2011 at 7:49 PM, indexzero <
[email protected]>wrote:
I have fixed this issue in the v0.4.0 branch. Unfortunately, it is not
stable due to a few bugs in the node.js http.Agent APIs that I am working to
resolve.We will push v0.4.0 when we can get these issues resolved in core;
hopefully the aforementioned fixes will make it into 0.4.3
from node-http-proxy.
Related Issues (20)
- Proxy don't work when switch target URL to object
- RSSI List
- UNMAINTAINED WITH SECURITY ISSUES
- How to forwarding a request when the proxy not found . HOT 1
- Single use proxy in multi-tenant application
- How to detect which client is receiving the package?
- Please fix version of Library "follow-redirects" to eliminate CVE-2023-26159 issue HOT 3
- Contact point or SECURITY.txt file
- Is the repo still developing actively ? HOT 1
- node-http-proxy HOT 1
- Node 18 will close proxied websocket connections after ~60 seconds
- Websocket return 403 upon upgrade request ? HOT 4
- Un-catchable Malformed_HTTP_Response crash. HOT 1
- changeOrigin:true changes Host header but not Origin header
- Proxy server target uses port of proxy instead of target port specified HOT 1
- Gihub
- util._extend is deprecated HOT 1
- Question: Is it possible to start proxy on a random port - how does one retrieve the port? HOT 2
- How to set up an upstream proxy
- Haunting EPIPE errors
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 node-http-proxy.