Open reinismu opened 3 months ago
@reinismu ... I have two questions
@sebhildebrandt I use node v20.11.1 and run my code with just node.
I have a long running process that calls blockDevices
every second. This happens usually after 4-5 hours of running.
maybe hitting ulimit. Invstigating now.
In any case I would like to handle that error
@reinismu I agree, handling the error makes sense ... but then I would have to do it everywhere where we have exec
... and the handling needs to be a little bit different.
@reinismu ... one more thing: running blockDevices
every second is quite often ... this action takes at least 1-2 seconds, so I would extend the period ... and depending of the use case you have this could be even really long (or is it, that you want to detect changes like adding USB sticks, external SSDs...?)
I know. this might not solve the issue ... but still I would increase the poll interval.
@sebhildebrandt Thanks for suggestions! Will do that. Working with a legacy system and don't want to rewrite it yet. 1-2 seconds execution time might explain how it run out of file descriptors.
Ye, all exec
's would need this then. This mostly just solved issue for me. Opened a PR so if someone else gets a similar issue they would have some info on it.
When running on MacOS I notices that sometimes the call process spawn will crash
I would like to handle it and not crash my nodejs process