GithubHelp home page GithubHelp logo

transparent-proxy's People

Contributors

erijo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

transparent-proxy's Issues

Growing memory usage.

Hello erijo!

I've tried this code but there is a memory leak.
Debug output after one request:

(Pdb) from guppy import hpy
(Pdb) hh = hpy()
(Pdb) before = hh.heap()
(Pdb) after = hh.heap()
(Pdb) delta = after - before
(Pdb) print delta
Partition of a set of 5079 objects. Total size = 521828 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 409 8 160940 31 160940 31 dict (no owner)
1 2366 47 102748 20 263688 51 str
2 40 1 67040 13 330728 63 dict of main.ProxyRequest
3 928 18 59264 11 389992 75 list
4 40 1 23128 4 413120 79 unicode
5 40 1 20960 4 434080 83 dict of main.ProxyClientFactory
6 40 1 20960 4 455040 87 dict of twisted.internet.tcp.Server
7 80 2 11200 2 466240 89 dict of twisted.internet.address.IPv4Address
8 80 2 11200 2 477440 91 dict of twisted.logger._logger.Logger
9 80 2 11200 2 488640 94 dict of twisted.web.http_headers.Headers

Every request raises count of all this objects and allocates more and more memory.
One more request after:

(Pdb) after = hh.heap()
(Pdb) delta = after - before
(Pdb) print delta
Partition of a set of 10711 objects. Total size = 1104316 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 852 8 337776 31 337776 31 dict (no owner)
1 4970 46 217372 20 555148 50 str
2 84 1 140784 13 695932 63 dict of main.ProxyRequest
3 1924 18 122960 11 818892 74 list
4 84 1 48528 4 867420 79 unicode
5 84 1 44016 4 911436 83 dict of main.ProxyClientFactory
6 84 1 44016 4 955452 87 dict of twisted.internet.tcp.Server
7 168 2 23520 2 978972 89 dict of twisted.internet.address.IPv4Address
8 168 2 23520 2 1002492 91 dict of twisted.logger.logger.Logger
9 168 2 23520 2 1026012 93 dict of twisted.web.http_headers.Headers
<24 more rows. Type e.g. '
.more' to view.>

I've tried to fix it by myself but im not so skilled in Twisted.
Hope you know how to fix it ;)
Best regards.

Connection close porpuse

What is the porpuse of the connection close line in the request that go out to the real server ?

And when i am removing that line , i get exception when i do self.finish() in the clentProxy request.

Can you please elaborate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.