Skip to content
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

貌似目前问题也挺多的 #11

Closed
leolee2356 opened this issue Jan 3, 2018 · 2 comments
Closed

貌似目前问题也挺多的 #11

leolee2356 opened this issue Jan 3, 2018 · 2 comments

Comments

@leolee2356
Copy link

leolee2356 commented Jan 3, 2018

使用配置如下

return $config = [
    //log目录
    'logPath'           => __DIR__ . '/../log',
    'logSaveFileApp'    => 'application.log', //默认log存储名字
    'logSaveFileWorker' => 'crontab.log', // 进程启动相关log存储名字
    'pidPath'           => __DIR__ . '/../log',
    'sleep'             => 2, // 队列没消息时,暂停秒数
    'processName'       => ':swooleTopicQueue', // 设置进程名, 方便管理, 默认值 swooleTopicQueue
    //job任务相关
    'job'         => [
        'topics'  => [
//            ['name'=>'MyJob', 'workerMinNum'=>1, 'workerMaxNum'=>20],
//            ['name'=> 'MyJob2', 'workerMinNum'=>3, 'workerMaxNum'=>10],
//            ['name'=> 'MyJob3', 'workerMinNum'=>1, 'workerMaxNum'=>10],
            ['name'=> 'football_match_list', 'workerMinNum'=>1, 'workerMaxNum'=>10],
        ],
        // redis
        'queue'   => [
            'class'    => '\Kcloze\Jobs\Queue\RedisTopicQueue',
            'host'     => '127.0.0.1',
            'port'     => 6379,`
表现出的问题是.已经挤压了很多消息,但是主进程也已经检测到了,但是一直不处理.
记录 crontab日志如下

2018/01/03 11:22:28 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:30 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:32 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:34 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:36 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:38 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:40 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:42 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:44 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:46 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:22:48 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:23:50 [info] [crontab.log] topic: football_match_list runnning len: 0
2018/01/03 11:23:52 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:23:54 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:23:56 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:23:58 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:24:00 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:24:02 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:24:04 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:24:06 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:24:08 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:24:10 [info] [crontab.log] topic: football_match_list runnning len: 24
2018/01/03 11:24:12 [info] [crontab.log] topic: football_match_list runnning len: 24

`

@kcloze
Copy link
Owner

kcloze commented Jan 3, 2018

是不是最新版呢?
看日志子进程退出了,没有再重新启动

image
要有worker start的日志,先升级到最新版

@kcloze
Copy link
Owner

kcloze commented Jan 4, 2018

windows玩不来swoole,swoole基于linux

@kcloze kcloze closed this as completed Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants