Giter VIP home page Giter VIP logo

Comments (5)

reqshark avatar reqshark commented on August 27, 2024

that's interesting, what kind of machine are you running?

from node-nanomsg.

gtoonstra avatar gtoonstra commented on August 27, 2024

mac osx , python 2.7 stock with python. I believe we built the nanomsg library from 0.5 and then just did an npm install of the latest npm library. I can check tomorrow if you want to be sure.

So the use case is:

  • we have a django server that serves web pages
  • the same django server can emit events from other sources.
  • in the index page, it loads socket.io from the nodejs server and establishes a connction
  • the index page hangs.

In the app.js, it allows connections from browser clients (which in this case do not seem to arrive). The app.js attempts to reconnect to django, then it hangs.

What makes this not so consistent is the console resize. So I had nodejs running in the console and when it's resized, messages start flowing again.

Not sure how the nodejs event loop is managed, but it probably doesn't call recv all the time, because it would block the main event loop, so it probably uses polling. Some spurious read event could then cause this loop to hang up pretty easily. That's a hypothesis to investigate anyway.

from node-nanomsg.

nickdesaulniers avatar nickdesaulniers commented on August 27, 2024

when the debug console running nodejs was resized, it all became alive again.
I had nodejs running in the console and when it's resized, messages start flowing again.

This makes no sense; unless a tty sends some form of signal to a running process on resize. I don't see how the two could even remotely be related. 🚔 🚷

from node-nanomsg.

reqshark avatar reqshark commented on August 27, 2024

ditto.

btw to clarify the dep versioning issue:

we built the nanomsg library from 0.5 and then just did an npm install of the latest npm library

as long as you have node 0.10 or later, or io.js, then doing npm install builds from a patched (slightly improved) version of the beta-5 release. that version gets baked into the binding automatically so having libnanomsg on your system is not a requirement.

from node-nanomsg.

gtoonstra avatar gtoonstra commented on August 27, 2024

I totally agree, I did that check a couple of times to reverify.

  • When doing nothing, the process hangs indefinitely. Refreshing the page does not help.
  • When nodejs is stopped, the page is loaded.
  • When the console that nodejs is running on is resized, the page continues too.

Note: with "messages start flowing again" I meant the messages over socket.io, not nanomsg.

In the check there were no external factors that could have interfered like other users or activity from other inputs.

This behavior is strange and I'm not sure if it's worth investigating further as I already have a reliable way to deal with it. It's good to keep it as history that it's been observed.

so important: It only occurs when nodejs connects to django for the first time.

In other sequences of starting up node and the other service, messages are received over both socket.io and nanomsg correctly.

If I get the time this week, I'll try to replicate it.

from node-nanomsg.

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.