-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.php
58 lines (57 loc) · 1.61 KB
/
Config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* Created by PhpStorm.
* User: yf
* Date: 2017/12/30
* Time: 下午10:59
*/
return [
'SERVER_NAME'=>"EasySwoole",
'MAIN_SERVER'=>[
'HOST'=>'0.0.0.0',
'PORT'=>9501,
'SERVER_TYPE'=>\EasySwoole\Core\Swoole\ServerManager::TYPE_WEB_SERVER,
'SOCK_TYPE'=>SWOOLE_TCP,//该配置项当为SERVER_TYPE值为TYPE_SERVER时有效
'RUN_MODEL'=>SWOOLE_PROCESS,
'SETTING'=>[
'task_worker_num' => 2, //default 8
'task_max_request'=>10,
'max_request'=>5000,//强烈建议设置此配置项
'worker_num'=>2 // defautl 8
],
],
'DEBUG'=>true,
'TEMP_DIR'=>null,//若不配置,则默认框架初始化
'LOG_DIR'=>null,//若不配置,则默认框架初始化
'EASY_CACHE'=>[
'PROCESS_NUM'=>1,//若不希望开启,则设置为0
'PERSISTENT_TIME'=>0//如果需要定时数据落地,请设置对应的时间周期,单位为秒
],
'CLUSTER'=>[
'enable'=>false,
'token'=>null,
'broadcastAddress'=>['255.255.255.255:9556'],
'listenAddress'=>'0.0.0.0',
'listenPort'=>'9556',
'broadcastTTL'=>5,
'nodeTimeout'=>10,
'nodeName'=>'easySwoole',
'nodeId'=>null
],
'MYSQL' => [
'HOST' => 'local-minikube',
'PORT' => 31101,
'USER' => 'isucon',
'PASSWORD' => 'isucon',
'DB_NAME' => 'torb',
'MIN' => 5,
'MAX' => 100
],
'POOL_MANAGER' => [
'App\Util\MysqlPool2' => [
'min' => 5,
'max' => 100,
'type' => 1
]
]
];