-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't open more than three ports on win10 #914
Comments
I found a workaround for this. Set UV_THREADPOOL_SIZE enviroment variable larger than count of serial ports BEFORE you start your app. (Default value is 4) |
I'm glad you found this. Sorry it's an issue. I'm going to keep this open pending the 5x release which might be able to address this issue on windows. |
You're welcome. :) 2016-09-02 5:12 GMT+02:00 Francis Gulotta notifications@github.com:
|
Would be great if 5.0 release could include a fix for this rather than setting environmental variables outside the program. |
The current bindings require a thread per port, there's not much we can do about that other than rearchitect the bindings. |
Ok thanks for confirming. I'll factor the environment variable into the setup for my app. |
To work with many ports on windows one should use IO completion ports (IOCP) API.
|
I completely agree, our current method of windows reading is far from optimal and this is the right way to go. I haven't explored it but it but I think |
AFAIK libuv didn't have IOCP support, at least 1 year ago. |
Hi, I'm having this same problem and would really like to have 4+ ports open simultaneously. I understand that I need to change an environment variable before the app is setup, but I don't understand how to do that. I think I'm supposed to paste this line of code somewhere:
But I don't understand where to put that code. Can someone point me in the right direction? I pasted at the very top of my main app, but it's not working. Thanks |
The environment variable needs to be set before node starts.
…---
Francis Gulotta
wizard@roborooter.com
On Fri, Mar 31, 2017 at 7:54 PM, jaredrolson ***@***.***> wrote:
Hi, I'm having this same problem and would really like to have 4+ ports
open simultaneously.
I understand that I need to change an environment variable before the app
is setup, but I don't understand how to do that. I think I'm supposed to
paste this line of code somewhere:
process.env.UV_THREADPOOL_SIZE = 6;
But I don't understand where to put that code. Can someone point me in the
right direction? I pasted at the very top of my main app, but it's not
working.
Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#914 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABlbvQhDiboZiC2coJGT_O9mYhGa23Wks5rrZI2gaJpZM4JrVQ->
.
|
Perfect thanks. I have it working now. I'm running my code from the command prompt, and it worked when I entered this into the prompt before running my app:
|
I've same problem. Please mention this limitaion and env variable in release notes so people know about this.. Unfortunately it takes long time before I saw this issue and possible workaround fix .. |
PRS welcome
…On Fri, Mar 31, 2017, 9:11 PM Jussi Vatjus-Anttila ***@***.***> wrote:
I've same problem. Please mention this limitaion and env variable in
release notes so people know about this.. Unfortunately it takes long time
before I saw this issue and possible workaround fix ..
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#914 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABlbneA_kEzrEHoDv40mA8vWTkGGegzks5rraQ2gaJpZM4JrVQ->
.
|
Also not an issue for 5x beta
…On Fri, Mar 31, 2017, 9:33 PM Francis Gulotta ***@***.***> wrote:
PRS welcome
On Fri, Mar 31, 2017, 9:11 PM Jussi Vatjus-Anttila <
***@***.***> wrote:
I've same problem. Please mention this limitaion and env variable in
release notes so people know about this.. Unfortunately it takes long time
before I saw this issue and possible workaround fix ..
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#914 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABlbneA_kEzrEHoDv40mA8vWTkGGegzks5rraQ2gaJpZM4JrVQ->
.
|
I've figured out the cause of this. I've opened #1221 as a feature request to fix this. If I can I'l have it out in the 5.0.0 release. |
SerialPort version: 4.0.1
NodeJS Version: 4.4.7 and 6.3.1
Operating System and Hardware: Win10 64bit
Are you using Electron/Atom/NwJS?: no
(Run
node -v && npm -v && python --version
to get version numbers)v4.4.7
2.15.8
Python 2.7.10
Summary of Problem
Cannot create more then 3 serialports on Win10.
Expected Behavior
Be open more ports.
Actual Behavior
If I create 4 or more it cannot be closed.
It also crashed my express webserver.
Steps and Code to Reproduce the Issue
If you put more than 3 portname to ports, the test will stuck after 'closing'.
If less then 4, everything is ok.
As I see the problem maybe at UV_THREADPOOL_SIZE
http://docs.libuv.org/en/v1.x/threadpool.html#
serialTest.txt
The text was updated successfully, but these errors were encountered: