Comments (5)
that's interesting, what kind of machine are you running?
from node-nanomsg.
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.
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.
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.
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)
- add support for nng HOT 4
- Error handling HOT 3
- TypeError: Path must be a string. Received undefined HOT 2
- rfc links
- Compile error in Node V12.* HOT 6
- vulnerable dependencies HOT 1
- deprecation warning from Nan::Callback::call HOT 2
- DeprecationWarning: Buffer HOT 2
- remove package-lock.json from .gitignore HOT 2
- fallthrough warnings in nanomsg HOT 1
- are we handling scopes correctly? HOT 1
- How do i catch timeout on reqrep?
- Carsh When msg send 10K per second HOT 2
- Electron compatibility: "Loading non-context-aware native module in renderer" HOT 1
- node 14.15 compatability HOT 1
- (node:660) electron: The default of contextIsolation is deprecated and will be c hanging from false to true in a future release of Electron. HOT 2
- Double handle scope
- -Wcast-function-type in nodejs/src/node.h
- sub: filter by binary chan prefix? HOT 1
- npm install --use_system_libnanomsg=true fails
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-nanomsg.