We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Previously (up to and including v0.3.6) a SIGTERM would cause nsqd to write topics to disk, eg:
$ ./nsqd [nsqd] 2016/05/05 15:01:35.413214 nsqd v0.3.6 (built w/go1.5.1) [nsqd] 2016/05/05 15:01:35.413237 ID: 306 [nsqd] 2016/05/05 15:01:35.413253 NSQ: persisting topic/channel metadata to nsqd.306.dat [nsqd] 2016/05/05 15:01:35.419317 TCP: listening on [::]:4150 [nsqd] 2016/05/05 15:01:35.419569 HTTP: listening on [::]:4151 [nsqd] 2016/05/05 15:01:52.290037 TOPIC(test-mpe): created [nsqd] 2016/05/05 15:01:52.290074 NSQ: persisting topic/channel metadata to nsqd.306.dat [nsqd] 2016/05/05 15:01:56.890127 NSQ: persisting topic/channel metadata to nsqd.306.dat [nsqd] 2016/05/05 15:01:56.890305 TCP: closing [::]:4150 [nsqd] 2016/05/05 15:01:56.890342 HTTP: closing [::]:4151 [nsqd] 2016/05/05 15:01:56.894243 NSQ: closing topics [nsqd] 2016/05/05 15:01:56.894258 TOPIC(test-mpe): closing [nsqd] 2016/05/05 15:01:56.894281 TOPIC(test-mpe): closing ... messagePump [nsqd] 2016/05/05 15:01:56.894305 TOPIC(test-mpe): flushing 3 memory messages to backend [nsqd] 2016/05/05 15:01:56.894346 DISKQUEUE(test-mpe): writeOne() opened test-mpe.diskqueue.000000.dat [nsqd] 2016/05/05 15:01:56.894393 DISKQUEUE(test-mpe): readOne() opened test-mpe.diskqueue.000000.dat [nsqd] 2016/05/05 15:01:56.894428 DISKQUEUE(test-mpe): closing [nsqd] 2016/05/05 15:01:56.894445 DISKQUEUE(test-mpe): closing ... ioLoop [nsqd] 2016/05/05 15:01:56.904126 QUEUESCAN: closing [nsqd] 2016/05/05 15:01:56.904138 LOOKUP: closing [nsqd] 2016/05/05 15:01:56.904142 ID: closing $ ls -1 *.dat nsqd.306.dat test-mpe.diskqueue.000000.dat test-mpe.diskqueue.meta.dat $
Topics have been persisted correctly. When nsqd is restarted it will find those messages and reload them.
With v0.3.7 the topics are not saved to disk, they are lost:
$ ./nsqd [nsqd] 2016/05/05 15:04:08.597467 nsqd v0.3.7 (built w/go1.6) [nsqd] 2016/05/05 15:04:08.597537 ID: 306 [nsqd] 2016/05/05 15:04:08.597558 NSQ: persisting topic/channel metadata to nsqd.306.dat [nsqd] 2016/05/05 15:04:08.603509 TCP: listening on [::]:4150 [nsqd] 2016/05/05 15:04:08.603582 HTTP: listening on [::]:4151 [nsqd] 2016/05/05 15:04:10.285973 TOPIC(test-mpe): created [nsqd] 2016/05/05 15:04:10.286018 NSQ: persisting topic/channel metadata to nsqd.306.dat fish: “./nsqd” terminated by signal SIGTERM (Polite quit request) $ ls -1 *.dat nsqd.306.dat $
Topic never hit the disk.
It does work correctly in v0.3.7 if I use SIGINT:
$ ./nsqd [nsqd] 2016/05/05 15:05:07.584102 nsqd v0.3.7 (built w/go1.6) [nsqd] 2016/05/05 15:05:07.584195 ID: 306 [nsqd] 2016/05/05 15:05:07.584238 NSQ: persisting topic/channel metadata to nsqd.306.dat [nsqd] 2016/05/05 15:05:07.599373 TCP: listening on [::]:4150 [nsqd] 2016/05/05 15:05:07.599406 HTTP: listening on [::]:4151 [nsqd] 2016/05/05 15:05:09.246353 TOPIC(test-mpe): created [nsqd] 2016/05/05 15:05:09.246419 NSQ: persisting topic/channel metadata to nsqd.306.dat [nsqd] 2016/05/05 15:05:13.044805 NSQ: persisting topic/channel metadata to nsqd.306.dat [nsqd] 2016/05/05 15:05:13.044899 TCP: closing [::]:4150 [nsqd] 2016/05/05 15:05:13.045123 HTTP: closing [::]:4151 [nsqd] 2016/05/05 15:05:13.067560 NSQ: closing topics [nsqd] 2016/05/05 15:05:13.067644 TOPIC(test-mpe): closing [nsqd] 2016/05/05 15:05:13.067676 TOPIC(test-mpe): closing ... messagePump [nsqd] 2016/05/05 15:05:13.067696 TOPIC(test-mpe): flushing 4 memory messages to backend [nsqd] 2016/05/05 15:05:13.067749 DISKQUEUE(test-mpe): writeOne() opened test-mpe.diskqueue.000000.dat [nsqd] 2016/05/05 15:05:13.067839 DISKQUEUE(test-mpe): readOne() opened test-mpe.diskqueue.000000.dat [nsqd] 2016/05/05 15:05:13.067899 DISKQUEUE(test-mpe): closing [nsqd] 2016/05/05 15:05:13.067914 DISKQUEUE(test-mpe): closing ... ioLoop [nsqd] 2016/05/05 15:05:13.079719 QUEUESCAN: closing [nsqd] 2016/05/05 15:05:13.079722 LOOKUP: closing [nsqd] 2016/05/05 15:05:13.079779 ID: closing $ ls -1 *.dat nsqd.306.dat test-mpe.diskqueue.000000.dat test-mpe.diskqueue.meta.dat $
The text was updated successfully, but these errors were encountered:
https://github.com/judwhite/go-svc/blob/master/svc/svc_other.go
var ( Interrupt Signal = syscall.SIGINT Kill Signal = syscall.SIGKILL )
The only signal values guaranteed to be present on all systems are Interrupt (send the process an interrupt) and Kill (force the process to exit).
Looks like syscall.SIGTERM needs to be added back for this functionality. I'll make the changes to the svc dependency and update godeps.
syscall.SIGTERM
svc
Sorry, something went wrong.
on unix you can't catch/handle SIGKILL (it's in the posix standard) so you can remove that one while you're at it
Gah, huge bummer, sorry about that!
BTW, this was a documentation issue at one point golang/go#13080
No branches or pull requests
Previously (up to and including v0.3.6) a SIGTERM would cause nsqd to write topics to disk, eg:
Topics have been persisted correctly. When nsqd is restarted it will find those messages and reload them.
With v0.3.7 the topics are not saved to disk, they are lost:
Topic never hit the disk.
It does work correctly in v0.3.7 if I use SIGINT:
The text was updated successfully, but these errors were encountered: