一个服务器怎么运行两个webman项目? (已解决)

aspire

报错

Workerman[start.php] start in DEBUG mode
Workerman[start.php] already running
/config/service.php

A项目

return [
    'listen' => 'http://0.0.0.0:8787',
    'transport' => 'tcp',
    'context' => [],
    'name' => 'webman',
    'count' => cpu_count() * 4,
    'user' => '',
    'group' => '',
    'reusePort' => false,
    'event_loop' => '',
    'stop_timeout' => 2,
    'pid_file' => runtime_path() . '/webman.pid',
    'status_file' => runtime_path() . '/webman.status',
    'stdout_file' => runtime_path() . '/logs/stdout.log',
    'log_file' => runtime_path() . '/logs/workerman.log',
    'max_package_size' => 10 * 1024 * 1024
];

B项目

return [
    'listen' => 'http://0.0.0.0:8989',
    'transport' => 'tcp',
    'context' => [],
    'name' => 'webman_1',
    'count' => cpu_count() * 4,
    'user' => '',
    'group' => '',
    'reusePort' => false,
    'event_loop' => '',
    'stop_timeout' => 2,
    'pid_file' => runtime_path() . '/webman.pid',
    'status_file' => runtime_path() . '/webman.status',
    'stdout_file' => runtime_path() . '/logs/stdout.log',
    'log_file' => runtime_path() . '/logs/workerman.log',
    'max_package_size' => 10 * 1024 * 1024
];
1209 1 0
1个回答

csnow

试试放在不同路径?

  • aspire 2023-08-25

    当然放不同的路径😂

  • xiuwang 2023-08-25

    两个项目的 webman.pid 内容相同导致的,里面是pid。删除其中一个

  • aspire 2023-08-25

    解决了,runtime目录删除后就好了, 感谢。🙇‍

年代过于久远,无法发表回答
×
🔝