Coder Social home page Coder Social logo

Comments (10)

mike01 avatar mike01 commented on May 18, 2024

Could be an exception in the verdict callback. I've added an exception handling in the newest master commit which should warn about such problems (packets will now be dropped in this case)

from pypacker.

svolpe avatar svolpe commented on May 18, 2024

I just updated my py-packer to the latest version. It still stops sending data after a period and is not giving any errors. Is there anything I need to do to test it? I'm running on a resource limited target (embedded ARM). I've monitored its RAM and CPU and have seen no corrilation to them when the pychecker stops passing data.
Is there any other way I can debug the problem?

from pypacker.

mike01 avatar mike01 commented on May 18, 2024

Well then I assume there is a problem on the sending side. Without code I can't say anything about that.

from pypacker.

svolpe avatar svolpe commented on May 18, 2024

There is actually no custom code. I'm running apache on the server side hosting 100MB binary file and then use wget on the client side to pull it. Its just a stress test system to test the implementation of the pypacker on the embedded system.

from pypacker.

mike01 avatar mike01 commented on May 18, 2024

So what's the exact Setup? Something like this?
[PC: wget -> pypacker:nfqueue] -> Network -> [Target: pypacker:nfqueue -> HTTP-server]
Did you make any basic network debugging? Checking traces via wireshark or similar?
Is the conenction reset or timed out? Any error messages anywhere? I can't say anything
without more information.

from pypacker.

svolpe avatar svolpe commented on May 18, 2024

The network looks like this:
server(apache)->bridge device(py-packer on it)->WAN->client
I have run wireshark and what I'm seeing is everything works great and then, for some reason, the bridge device (running py-packer) stops forwarding the ACKs from the client to the server. I'm not 100% sure if also stops transmitting data from the server to the client. I beleive it does as I see the client continually trying to send the same packet but its not coming out the other end of the bridge. There are tons of retries but nothing gets through the bridge. After stopping/starting the py-packer on the bridge it starts working again. I tried stopping/starting the py-packer script on the client but that does not recover the problem. My guess is it must somehow be caused by the limitations of resources on the embedded bridge device but can't seem to find the smoking gun yet. I was also thinking about using the multiprocessing capabilities in python as it is a quad core ARM device. My first attempt at doing that with the py-packer interceptor did not work. I will continue to dig in. Once I get the multiprocessor working I will share the code for others. Any thoughts on this would be greatly appriciated.

from pypacker.

svolpe avatar svolpe commented on May 18, 2024

I ran python-netfilterqueue on the same system and I do not experiance the same issue. I'm not really interested in using that as my approach because py-packer is such a nicer API to use.

Just to summerize:
I get no errors in the /proc/net/netfilter/nf_log. There is nothing in /var/log/messages. No errors are coming out of the py-packer program. I've used wireshark and it looks like communications stops. The connections are not reset and they just hang (since no packets coming out of the netfilter queues) until they timeout.

Is there anything I can do to debug deeper into py-packer and see where the problem lies?

from pypacker.

svolpe avatar svolpe commented on May 18, 2024

Following the instructions on "Enlarge receive/send buffers to get max performance." made a difference, now it does not stall and not recover. It still has small stalls but seems to finish 100% of the time. I've run a 100MB file through it 10 times now.
What supprises me is increasing the number of queues does not seem to have any effect on the performance.

from pypacker.

mike01 avatar mike01 commented on May 18, 2024

Nice to hear the problem got solved. There can be a multitude of reasons for the "not increasing performance" and the max network bandwidth as bottleneck is just one of them, so it's hard to say what's going on.

from pypacker.

mike01 avatar mike01 commented on May 18, 2024

Closing due response timeout

from pypacker.

Related Issues (20)

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.