Ratchet websocket server not responding after some hour - websocket

Hi i am using ratchet fas my websocket server.I run the server by using the below command.
nohup php path../chat-server.php > ratchet_ws.log &
But its terminated after some time.So i have implemented the supervisor concept given in Rachet website
http://socketo.me/docs/deploy.
It keep my chat-server.php running but its not responding after 4-5 hours.
Thanks for any help.

Related

EC-2 suddenly stopped sending smtp.gmail.com mail - connection timeout

Im running a Laravel 6 app on AWC EC-2 instance and have it configured to send mail via Gmail SMTP. Has worked perfect for nearly 2 years. Approx 1-1.5 days ago, the email function started throwing the Connection timed out error.
I tried switching ports, and changing TLS to SSL and no change.
Ive read dozens of threads with the same problem - but no help. Most suggest changing from driver smtp to sendmail - but that breaks all my email-send code.
I tried to telnet smtp.gmail.com 587 from the command line - and get Host is unreachable. There has been NO change to the code, config or setup recently.
My thoughts right now, are either:
AWS have blocked my smtp port,
Google has blocked my IP from sending mail,
My server MAY have reached a limit of some sort (but thought it will un-suspend in 24hrs if the case)
I am not sure HOW or WHERE to find that answer, or if there is another possible problem/solution here. I only have Basic support with AWS - so cant raise a standard tech support q.
Any suggestions would be greatly appreciated.
With thanks - James (Image of error and env below).

Laravel WebSockets - deployment - fails to connect the websocket

I am trying to deploy my laravel project with websockets built on Beyond Code's package.
My server is on AWS and i'm using WHM.
on the cPanel's terminal i'm running the line php artisan websockets:serve
and i get the result Starting the WebSocket server on port 6001...
when i'm loading the page with the websocket's connection sometimes i get the error failed: Error during WebSocket handshake: Unexpected response code: 200
and sometimes i get the error failed: WebSocket is closed before the connection is established.
On AWS EC2's Security Groups i allowed the Custom TCP port 6001 and 6002
Any suggestions to fix it?
Maybe a good deployment tutorial for Laravel WebSockets?
I'm looking for answers all over the internet and i get nothing useful.

Implementation of Socket IO

I am implementing socket io in my project. I have installed redis, laravel-echo server and node. Now I am trying to call socket io in my project using http://myserver:6001/socket.io/socket.io.js but it is giving not found error.
I have tried many solutions but socket io is not working. Please help me to resolve this problem.
Make sure laravel-echo-server is running. If it is not then you can initialise it using laravel-echo-server init and then start it using laravel-echo-server start

Check if a client is connected to the OwnCloud server

How one could check on the server where ownloud is running if currently a client is connected? Is there a command provided by ownloud itself or can this be done via Bash?
Not possible, yet! You can make an plugin which looks up the last sync time.
And if $time < 60 secs ago then client is online.

Meteor client can't connect to server

At least half of the time, when a client loads my Meteor app, it can't connect to the server.
If I run this in the console:
Deps.autorun(function() {
console.log(Meteor.status());
});
I can see that the client is connecting, disconnected, reconnecting repeatedly.
If I open the Network tab in Chrome's dev tools I can see that about every second or two, another WebSocket request is made.
What could be causing this?
Did you try disabling WebSockets? Try running your meteor app with following env variable
export DISABLE_WEBSOCKETS=true
This suggestion was posted by Arunoda on CodersClan.

Resources