index 924bd51327b7..6841c74eac00 100644
--- a/[Documentation/networking/ip-sysctl.txt](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/ip-sysctl.txt?id=39dbc646fd2c67ee9b71450ce172cbd714d4e7fb)
+++ b/[Documentation/networking/ip-sysctl.txt](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/ip-sysctl.txt?id=79e9fed460385a3d8ba0b5782e9e74405cb199b1)
@@ -667,11 +667,15 @@ tcp_tso_win_divisor - INTEGER
building larger TSO frames.
Default: 3
-tcp_tw_reuse - BOOLEAN
- Allow to reuse TIME-WAIT sockets for new connections when it is
- safe from protocol viewpoint. Default value is 0.
+tcp_tw_reuse - INTEGER
+ Enable reuse of TIME-WAIT sockets for new connections when it is
+ safe from protocol viewpoint.
+ 0 - disable
+ 1 - global enable
+ 2 - enable for loopback traffic only
It should not be changed without advice/request of technical
experts.
+ Default: 2```
Much appreciated!
PHP生成器递归遍历目录
private function fullScanDir($dir): \Generator
{
$list = scandir($dir);
foreach ($list as $filename) {
if ($filename === '.' || $filename === '..') continue;
if ($filename === '.git') continue;
$aDir = sprintf("%s/%s", $dir, $filename);
if (is_dir($aDir)) {
foreach ($this->fullScanDir($aDir) as $_filename) {
yield $_filename;
}
} else {
yield $aDir;
}
}
}
MySQL查询事务锁表进程信息
SELECT * FROM information_schema.INNODB_TRX;
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS;
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
[Warning] Could not increase number of max_open_files to more than 1024 (request: 10811)
解决方法:
修改服务
vim /usr/lib/systemd/system/mariadb.service
#在[service]下面加
[Service]
LimitNOFILE=infinity
html/css实现打印分页
Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
nginx proxy_pass使用gzip传输节约内部流量
location / {
...
proxy_set_header Accept-Encoding "gzip";
...
proxy_pass ...;
}
PHP笛卡尔积的一种实现方式
_reindex
__construct、register_shutdown_function、__destruct执行顺序
run __construct
run shutdown_function
run __destruct
* unset 等操作可以提前触发 __destruct
可以利用变量作用域在__destruct内来释放连接、解锁等释放操作