LMLPHP后院

nginx client intended to send too large body技术

maybe yes 发表于 2021-05-09 00:50

nginx 出现了报错日志,咋一看,就是 POST 了大数据,只能修改配置了,怎么设置,请看:

报错类似:

2021/05/08 12:16:13 [error] 11798#11798: *28202901 client intended to send too large body: 1268248 bytes, client: , server: , request: "POST HTTP/1.1", host: ""

解决办法:

http {
  ...
  client_max_body_size 5m;
}

更换服务器后,出现了久违的错误,因为我配置的是域名。

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for [lmlphp.com]:has changed,
and the key for the corresponding IP address [192.46.218.18]:
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:t8bG23KQlimQ5MvG5rea0eKq1Jps8W8lOpaoi0AVyro.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:1
  remove with:
  ssh-keygen -f "/root/.ssh/known_hosts" -R "[lmlphp.com]:"
ECDSA host key for [lmlphp.com]:has changed and you have requested strict checking.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(235) [Receiver=3.1.3]

突发,写了一段测试电脑速度的代码技术

maybe yes 发表于 2021-05-08 17:03

突发奇想,想试试电脑循环一个 INT MAX 需要多久,发现可以测量下电脑的速度,一举两得!

为什么会这么想呢,因为我总是担心 MySQL 自增超出了怎么办,如何自动的避免这些带来的报错!

测试下 INT_MAX 循环下来耗时多久吧,我比较担心自动增长是不是有问题的设计,如果达到了最大值怎么办?这样程序崩溃了啊,对于频繁增删的表来讲,达到这个最大值不需要多久。

test.php 文件内容:

for ($i=0; $i<2147483647; $i++) {
        if ($i==2147483646) {                                                                                                                                                          
                var_dump('ok');
        }
}

rsync transfer file through ssh jump技术

maybe yes 发表于 2021-04-29 19:45

很少使用,很早就知道 ssh 是个非常强大的东西,不过它不太稳定,容易死掉。对于传输文件的 jump 方式也许是比较方便的做法。

测试了一番,发现是可以用的,只不过在 ssh 参数里面不再可以使用 ssh config 中的配置别名了,这也好理解,因为 rsync 的参数中的命令不会再去匹配配置文件,不知道有没有更加简单的写法。

sudo rsync -avz --append --progress -e 'ssh -J root@x.com:22' lmlphp:bak/ bak/

运行之后的结果会是怎么样呢?当然是输入两次密码啦,第一次先输入跳板机的密码,第二次输入目标机的密码。

不知道 rsync 本身有没有提供类似的功能参数呢!

Fatal Error:imagecreatefromstring(): gd-png: fatal libpng error: CgBI: unhandled critical chunk in技术

maybe yes 发表于 2021-04-25 20:44

处理图片经常会遇到各种错误,处理这些错误似乎没有什么好的方法,记录一下:

https://bbsmax.ikafan.com/static/L3Byb3h5L2h0dHBzL2ltYWdlczAuY25ibG9ncy5jb20vYmxvZzIwMTUvNzU1MTYxLzIwMTUwOC8wODIxMjMxNDA2NTEzMzQucG5n.jpg
[1998668.388722] ieee80211 phy0: brcmf_run_escan: error (-110)
May  1 03:51:34 raspberrypi kernel: [1998668.388743] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-110)

Error: Could not resolve host 怎么回事技术

maybe yes 发表于 2021-04-23 21:36

域名解析是个头等大事啊!

短短的几十分钟,产生了 17000 多行错误日志,损失了1700 多位用户。

生活会教会你如何选择一个域名服务商!

2024-04-27 11:57:42 1714190262 0.012354