我理解在不同的虚拟主机上使用"reuseport"用于相同的IP:PORT对是错误的:
http {
server {
listen 192.168.0.1:80 reuseport;
server_name server1;
…
}
server {
listen 192.168.0.1:80 reuseport;
server_name server2;
…
}
}
Run Code Online (Sandbox Code Playgroud)
这个配置给了我:
nginx: [emerg] duplicate listen options for 192.168.0.1:80 in /etc/nginx/vhosts/server1.local.conf:66
Run Code Online (Sandbox Code Playgroud)
要么
nginx: [emerg] listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
Run Code Online (Sandbox Code Playgroud)
所以我要为每个虚拟主机使用唯一的IP:PORT对?
同时在服务器范围内"监听80重启端口"; 工作得很好,但它是否与每个独特的IP一样:PORT?
我在 Windows 上使用 Docker。
错误:
Step 4/5 : RUN npm install -g
---> Running in ec6582e10f69
+ lfg-auth@1.0.0
added 1 package in 0.437s
Removing intermediate container ec6582e10f69
---> f2b9a25a51a3
Step 5/5 : RUN npm run build-tsc
---> Running in 6321ac31e370
> lfg-auth@1.0.0 build-tsc /app
> tsc
/app/node_modules/.bin/tsc: line 1: XSym: not found
/app/node_modules/.bin/tsc: line 2: 0021: not found
/app/node_modules/.bin/tsc: line 3: 8cbd85238d8fbeb66a0afc1d79bcd880: not found
/app/node_modules/.bin/tsc: line 4: ../typescript/bin/tsc: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! …Run Code Online (Sandbox Code Playgroud) 我有一个带有大量测试的 Laravel 项目。我使用 pcov 来计算代码覆盖率,大约需要 4 分钟。但 pcov 不支持分支覆盖,所以我决定使用 xdebug。
使用 xdebug 测试执行,使用代码覆盖率但不使用 --path-coverage(分支覆盖率)大约需要 8 分钟。
但是使用 xdebug、代码覆盖率和 --path-coverage(分支覆盖率)测试执行需要超过 2 个小时,甚至不能等到结束:
INFO[2021-09-14 21:33:24] Executing runtests with coverage xdebug
XDEBUG_MODE=coverage
php artisan test --parallel --processes=8 --verbose --passthru=--path-coverage tests/Feature --coverage-text
Warming cache for static analysis ... done [00:00.071]
............S................................................ 61 / 1180 ( 5%)
............................................................. 122 / 1180 ( 10%)
............................................................. 183 / 1180 ( 15%)
............................................................. 244 / 1180 ( 20%)
.......
INFO[2021-09-15 00:00:05] finished in 2h 26m 40.458565176s
Run Code Online (Sandbox Code Playgroud)
所以我的问题是 --path-coverage …
从服务器端,我需要终止/中止请求,而不像nginx 的 444那样对客户端做出任何响应。
从客户端看,它应该看起来像是由对等方重置的连接。