Giter Site home page Giter Site logo

Comments (5)

Soniccube avatar Soniccube commented on July 17, 2024 1

You should increase the max file descriptor limit by
ulimit -n 51200

here is more optimizations for your server https://github.com/shadowsocks/shadowsocks/wiki/Optimizing-Shadowsocks

from realm.

zephyrchien avatar zephyrchien commented on July 17, 2024 1

It seems there was no more available port to be allocated, the OS was complaining. I have to point out that there is a potential resource leak in the current code, for which I am responsible.

The udp module was initially created by me a few months ago, to solve #26. It is not so well designed(I supposed that people seldom use this program to forward udp, so I tried to minimize the overhead..). After the merge(#27), it just works.

There is only one global timer, which finally clears states and close fds. If the relay continues to receive UDP packets, the cleaning up logic will never be executed, thus leading to a resource leak. Morever, the hardcoded TIMEOUT value is 15min, making the problem even more severe.

The solution is simple: set timeout for each socket & set a proper TIMEOUT value.

from realm.

fuyutsuki avatar fuyutsuki commented on July 17, 2024

Thanks for the reply, I'll try it!

from realm.

fuyutsuki avatar fuyutsuki commented on July 17, 2024

Hi, the next one crashes with the following error, is there any solution?

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', src/udp.rs:29:88

from realm.

fuyutsuki avatar fuyutsuki commented on July 17, 2024

I tried to fix it by tweaking the timeout value, but I wasn't able to set the timeout for every single socket, thank you!

from realm.

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.