3 ms·
That does not sound like a sound implementation.
by avip 8y ago
That does not sound like a sound implementation.
- zamalek 8y agoThe bug occurs if your process reaches ~25 days, period. Regardless of the interval that you set - it could be 1ms and still fail. It has been 'fixed' and is now ~49 days, but setTimeout does not throw and so you have to rely on your process crashing due to some other condition. If you have setTimeout anywhere in your code (including packages), you will need to force it to crash/exit once a month. The implementation of setTimeout in Node is not sound.
- olliej 8y agoIt’s perfectly reasonable: Run task every 4 weeks: Onesecond = 1000; Oneminute = 60 * oneSecond; oneHour = 60 * oneMinute; oneDay = 24 * oneHour; oneWeek = 7 * oneDay; Then from that reasonable set of definitions you make a even fire in 4 * oneWeek. Maybe you aren’t even using setTimeout, but you’re using a timer library that internally is just using aetTineout (what does node have besides setTimeout by the way?). You end up with an accumulation of individually reasonable questions that don’t work, for no obvious reason. That said someone else is saying this actually is a “timers stop working in general after X days”, rather than just long lifetime timers, which makes this even more obtuse.