On Wed, Dec 24, 2014 at 11:34 PM, Phani Kumar <[email protected]> wrote: > Yes, it is causing the problem. The application is not just a server to exit > the cluster. Based on some criteria we wanted to start server (accept > connections) or close server so that no worker should accept connections. We > need more control over here.
Just to be clear: if all workers close, then NO worker will ever get a connection accepted. > Yes, as you said it looks it is the master which is not getting killed and > still accepting connections. And the master does NOT accept connections. The kernel DOES accept them, but they will never be accepted() by the node application, and will eventually timeout. > Doesn't it inconsistent/ a bug or a gap? If we are using cluster no way we > an close server gracefully without killing node application. > > Should we file a jira? Not worth it against v0.10, changing this would be either a feature addition, not allowed, or backwards incompatible, also not allowed. Try v0.11, it is sufficiently different that it might work like you want already, and its "pretty close" to release. You also may consider using undocumented features of cluster. This code won't be portable across v0.10 and v0.11/0.12, but if you poke around in the cluster master's undocumented internal properties, I think you can find the data structures it uses to store the server sockets. If you can get the handles, you can close them yourself. Cheers, Sam -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CACmrRmQM%2BAFqnitujprK%3DPcHkpqTN8ba6eWB8pGFfLPVF-HFUA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
