运行php start.php restart,回车的一瞬间,整台服务器就挂掉

peirenlei

问题描述

本地开发一切正常,代码上传到服务器,只要一运行php start.php restart,回车的一瞬间,整台服务器就挂掉,只能重启服务器,屡试不爽

报错信息(runtime/logs/workerman.log)

5-01-13 17:16:10 pid:22569 worker[webman:23785] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23729] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23737] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23851] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23791] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23757] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23816] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23756] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23767] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23889] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23885] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[plugin.webman.redis-queue.consumer:23759] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[plugin.webman.redis-queue.consumer:23052] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23749] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23762] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23787] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23722] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23739] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23789] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23807] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[plugin.webman.push.server:23680] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23883] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23805] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[plugin.webman.redis-queue.consumer:23585] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23769] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23754] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23813] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23833] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23723] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23745] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[plugin.webman.redis-queue.consumer:23687] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23806] exit with status 9
2025-01-13 17:16:10 pid:22569 worker[webman:23732] exit with status 9
2025-01-13 17:16:10 pid:22569 Workerman[start.php] has been stopped

操作系统及workerman/webman等框架组件具体版本

centos7服务器

"require": {
    "php": ">=7.2",
    "workerman/webman-framework": "^1.5.0",
    "monolog/monolog": "^2.0",
    "saithink/saiadmin": "^3.1",
    "illuminate/database": "^11.36",
    "illuminate/pagination": "^11.34",
    "illuminate/events": "^11.34",
    "symfony/var-dumper": "^7.1",
    "laravel/serializable-closure": "^2.0",
    "kriss/webman-eloquent-ide-helper": "^1.2",
    "webman/console": "^1.3",
    "webman/push": "^1.0",
    "ext-json": "*",
    "overtrue/wechat": "^5.0",
    "psr/container": "^1.1.1",
    "webman/blade": "^1.5.5",
    "symfony/cache": "^6.4",
    "psr/simple-cache": "^3.0",
    "php-di/php-di": "^6.3",
    "doctrine/annotations": "^1.14",
    "ext-simplexml": "*",
    "ext-xdebug": "*",
    "webman/redis-queue": "^1.3",
    "coraxster/flysystem-aws-s3-v3-minio": "^1.0",
    "jenssegers/mongodb": "^5.1",
    "ext-imagick": "*",
    "godruoyi/php-snowflake": "^3.1",
    "predis/predis": "^2.3",
    "ext-redis": "*",
    "fukuball/jieba-php": "^0.34.0",
    "ext-openssl": "*"
  },

已经不敢运行启动命令了,求救。。。。。

199 3 0
3个回答

peirenlei

截图

服务器内存爆掉了

奇怪我本地很正常,这个应用就是个正常的crud

  • latin 2天前

    服务器内存不够用了,进程被linux内核kill掉了。
    所以你开了多少进程?服务器内存多大?

  • peirenlei 2天前

    这不科学啊,我本地开发8g的本子,内存都毫无波动,服务器32g的内存,并且是php start.php start的一瞬间,整个系统都不动了,就算内存泄漏也不会一瞬间就把服务器打爆吧?

  • latin 1天前

    不是内存大内存就随便用,比如其它程序mysql啥的占用很大内存,剩余给webman的就没多少了,进程开多了内存就不足了。

xiaoming

所以你开了多少进程 这个先确定下

  • peirenlei 2天前

    默认的,我没特意去设置,哪里可以看到有多少进程?

  • peirenlei 2天前

    看了下代码,默认是cpu核心数*4,我服务器是56 核的,难道是进程开多了?我试试修改一下

  • peirenlei 2天前

    果然,我修改成 'count' => 4 就好了,谢谢你的提醒,56*4,200多个进程能把我服务器打垮

  • JaguarJack 1天前

    200多个进程不会打垮服务器啊,才 8GB

  • peirenlei 1天前

    理论上不会,但是我修改了进程数量后,症状立即就消失了,我也很郁闷

  • peirenlei 1天前

    理论上不会,但是我修改了进程数量后,症状立即就消失了,我也很郁闷

TM

56核服务器才32运行内存啊

  • TM 1天前

    因为本地如果是windows,只会开一个进程的

  • peirenlei 1天前

    我本地是mac

×
🔝