Worker crash on socket close
See original GitHub issuenode.js version: 12.14.1
faktory-server version: pro-1.4.0
faktory-worker package version: 3.3.6
Expected Behavior:
Worker disconnects should be handled and retried.
Actual Behavior:
Unhandled exception leading to the worker not receiving any jobs.
The stack trace:
at TCP.<anonymous> (net.js:664:12)
at Socket.EventEmitter.emit (domain.js:475:20)
at Socket.emit (events.js:223:5)
at Connection.onClose (/app/node_modules/faktory-worker/lib/connection.js:120:41)
Error: Connection closed
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
at async Worker.tick (/app/node_modules/faktory-worker/lib/worker.js:76:19)
at async Client.fetch (/app/node_modules/faktory-worker/lib/client.js:176:22)
at /app/node_modules/generic-pool/lib/Pool.js:475:16
at Pool.destroy (/app/node_modules/generic-pool/lib/Pool.js:546:10)
at Pool._destroy (/app/node_modules/generic-pool/lib/Pool.js:137:42)
at ConnectionFactory.destroy (/app/node_modules/faktory-worker/lib/connection-factory.js:54:23)
at Connection.close (/app/node_modules/faktory-worker/lib/connection.js:205:12)
at new Promise (<anonymous>)
at /app/node_modules/faktory-worker/lib/connection.js:206:50
at Socket.end (net.js:580:31)
at Socket.Writable.end (_stream_writable.js:617:10)
at Socket.writeAfterFIN [as write] (net.js:447:14)
Error: This socket has been ended by the other party
2020.08.03 17:54:59 LOG5[11]: Connection closed: 8736 byte(s) sent to TLS, 23781 byte(s) sent to socket
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (10 by maintainers)
Top Results From Across the Web
Close server socket on quit/crash - python - Stack Overflow
Terminating a program makes all its sockets automatically close. However, the TCP ports are still kept in use after that.
Read more >Server crash when client closed socket - LinuxQuestions.org
Hi, I am trying that the server dont crash when any client closed the socket. The server must be always alive, but itn't...
Read more >Raw client socket crash when connection aborted in Android.
When network connection is switched off (for example: airplaine mode) client socket throws an uncatchable exception. ... Steps to reproduce the behavior: clone ......
Read more >Crash and Burn with TCPSocket. - Mbed
If another connection is made, the OS will crash! 2) Closing: Connections are closed using MyServerSocket ->close(); OK so far, ...
Read more >How to write reliable socket servers that survive crashes and ...
In order for subsequent requests to succeed, we need to start the server again after it has crashed. One way to do that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hey @jbielick, I’ve installed 4.0.0 but I’m seeing the same behaviour as before i.e on second restart the worker does not re-connect 😕
I would give 4.2.0 a try if you’re having this issue (now or in the future). Please reopen if it persists.