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;
}
}
}
月度归档:2023年10月
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 ...;
}