swoole
Tuhey
人法地,地法天,天法道,道法自然。——道德经
展开
-
swoole平滑重启的两种方式
#通过shell脚本进行平滑重启echo "loading....."#(查看进城别名对应的进程号)pid=`pidof live_master`#杀死worker进程kill -USR1 $pidecho "loading success"#通过onRequest事件接受重启命令进行重启(官方)if (isset($request->get['sys_reload'])) { //$GLOBALS['glb'] = tools::serverInit( (.原创 2020-12-31 16:18:32 · 905 阅读 · 0 评论 -
linux + swoole定时器 + php监控服务进程稳定性
<?php/** * 监控服务 ws http 8811 * Created by PhpStorm. * User: fanbin * Date: 20/12/31 * Time: 下午16:32 */class Server { const PORT = 8811; public function port() { $shell = "netstat -anp 2>/dev/null | grep ". self::PORT . " |原创 2020-12-31 15:44:54 · 157 阅读 · 0 评论 -
swoole完美支持tp5
<?php//http服务use think\Container;$http = new Swoole\Http\Server('0.0.0.0', 8811);$http->set([ 'enable_static_handler' => true, //开启静态文件请求处理功能,需配合 document_root 使用 默认 false 'document_root' => '/var/www/html/study/tp5/public/stati原创 2020-12-29 17:00:15 · 241 阅读 · 0 评论 -
Linux升级Swoole及gcc
因业务方面需要升级swoole,从2.2升级到4.51.wgethttps://github.com/swoole/swoole-src/archive/v4.5.2.tar.gz2.tar -zxvf v4.5.2.tar.gz3.cdswoole-src-4.5.24.在当前目录执行phpize,由于我用的是宝塔,所以我的执行命令是:/www/server/php/72/bin/phpize;5../configure --with-php-config=/www/server...原创 2020-08-24 19:19:30 · 755 阅读 · 3 评论