-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Error being started in daemon mode: Unknown: send of 5 bytes failed with errno=32 Broken pipe in file Unknown on line 0 #454
Comments
I found there is something in my code. I dont see any errors in console. |
Can you show your codes? |
Here is code. It works in DEBUG mode and it does not works in DAEMON mode.
So i found out mysql error.
|
Do not connect mysql before The solution is put the connecting database codes into the $worker = new Worker('websocket://0.0.0.0:1234');
$worker->onWorkerStart = function () {
global $database;
$database = new Medoo($db_conf);
$datas = $database->select("bots", "*", ["widget"=>$connection->token]);
....
};
$worker->onMessage = function($connection, $data){
global $database;
$database->select(...);
};
...
Worker::runAll(); |
Thanks alot! It works! |
If i start in daemon mode i see it in console
Also this error in web client
Error in connection establishment: net::ERR_CONNECTION_RESET
But everything works fine if i start in DEBUG mode.
Whats the difference? Why same code works in DEBUG and does`t work in DAEMON mode?
The text was updated successfully, but these errors were encountered: