-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
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
[Ask About Hangup Signal] #25
Comments
The signal handler is intended for graceful shutdown. I.e. to tell the server to close connections and do other clean up. The signal is sent by the environment. I.e. it's something external to the server. Would it be possible that EC2 sends SIGHUP when the process runs out of resources? Maybe out of memory or similar? |
See here: https://en.wikipedia.org/wiki/SIGHUP |
Is it possible that you launch the server from the shell and then close the shell? |
Here is how I launch the server:
Notice that last |
Hmm…, yes, I was also expecting the same thing. But I wasn’t sure because I was only running 3 users. So I thought maybe Tinode have somekind of internal mechanism which will send SIGHUP signal when some events or errors occurs which I wasn’t aware of. But from your explanation it confirms that the signal came purely from the environment, not from Tinode itself.
Yes, I also did similar things using nohup :D Ok, thank you very much, Gene. At least I got some clue for the issue :D (y) |
Hello, Gene I found the cause of The issue was caused by unexpected behavior (at least for me) of Such situation happen when we are already starting the background process then somehow the SSH connection broke (indicated by message Thus the correct way to setup background process on
By using Here is the same guy which have the same experience like mine: Let me know if you found my understanding is incorrect. I hope this could help anyone facing the same issue. Thanks. |
Makes sense. Good to know. Maybe you can suggest this is the docs, for example here: Thanks! |
In centOS you can make this script as a service, follow the below steps
This script can be changed a little bit to work on Linux, Ubuntu and MacOS |
@mudphilo thanks for this script, it's amazing. Can I get your email, please ? |
Here is my email address [email protected] |
Hello, Gene
I have question regarding hangup signal (syscall.SIGHUP) in Tinode. What are the possible causes for Tinode to receive hangup signal?
So I was trying to run Tinode cluster on EC2 instances behind load balancer. On each instances I was using nohup to run Tinode on the background. When I tried to use it, sometimes only one instances shutdown randomly, sometimes both. When I check the output on
nohup.out
I notice following consistent output:Signal received: 'hangup', shutting down
.Before I was running Tinode on cluster, I also tried to run Tinode on single instance & sometimes I get the same output. But in cluster setup, it is occurred more often. Especially when I tried to send large payload from another instance.
So what are the possible causes for this issue on Tinode?
Thanks
The text was updated successfully, but these errors were encountered: