恒大要凉

综合目前各种情况和消息,国家不会出手救助恒大!

最近的政策风向标

三座大山 , 住房,教育,医疗

住房, 一连串的政策发布, 虽然没还按住,差不多算冷处理了

教育, 直接拦腰一刀砍了下, 股市boom…….

医疗, 下一步就是这个了,医药类的股票,基金布局可以调整下了 , 避免波及

所有的政策都是民生方向,

从各大互联网公司(高薪的年轻人) 取消大小周,取消996

只有一个目标, 让年轻人生娃.

医疗类的 首当其冲可能是医美类的

https://cn.reuters.com/article/china-samr-food-hea-regs-0802-idCNKBS2F304G?il=0

2021年了,这2个公司一点没变

10多年了

从10M端口的服务器
到100Mbps
到后来的1Gbps
在到现在的10Gbps端口

而这二个公司 , 一个美国一个香港,好多年了

www.sunnyvision.com
www.take2hosting.com

还在默认给10Mbps带宽……..
真的有生意嘛? 我觉得他们能在坚持10年

take2hosting我看了下账单日期,最早是2010年…… 现在2021年了,10年过去了…….

Thinkphp 6 输出图片

搜索了下相关内容
大部分都是COPY同一来源的这篇文章
解决ThinkPHP里无法输出图片问题(关于设置响应头) https://www.php.cn/phpkj/thinkphp/472856.html
解决办法是扩展 Response类, 缺陷是 每次 composer update 就会覆盖掉扩展文件
这样的解决办法不在考虑范围之内…..

实际上这个问题官方也没写清楚
但是官方有例子啊
对 就是那个验证码 , 需求是一致的,直接看他代码就好了…..

继续阅读 →

批量开多个VPS,批量管理多个AMAZON网店站群

批量开多个VPS,来管理多个AMAZON网店站群

主要用途是
Amazon的商店站群管理 , 避免同区域IP同电脑,导致

之前给杭州一个电商公司, 部署了这个方案和大家分享下
使用反馈还不错,合同签的150个,美国几个州

好几年前接了一个客户,做电商代运营的

客户需求

  • 多台Windows系统的VPS
  • IP需要分布在美国不同的州和城市
继续阅读 →

自己养的微信,跪着也要上交资料

自己养的微信,跪着也要上交资料

绑的备用135号码的微信小号被封了
理由是长时间未登录
什么都没变过
经过一系列的验证码,扫码,发短信到1069
现在是临时登录状态
如果要继续使用
首先你要
1. 实名认证
2 .上传身份证照片
3. 绑定银行卡
户口本当然不用的,祖上18代也不用
注销?不存在的….
额,我已经删了微信了

继续阅读 →

把日常开发机器换成AMD了

因为网络问题现在不用本地电脑做开发了
办公室用的AMD 3600,大部分时间都是远程用和登录网银发发工资什么的

之前一直的E3-1270v2/32G内存/2x4T硬盘有些老了性能跟不上,也便宜 $49/月
主要是日常一些软件打开和编译太慢了,其他倒是没什么

现在配的是AMD 3900X 12核/64G内存/1块1000G Nvme + 1块4TSATA $99/月
其实SATA硬盘还是真必须配一块
Nvme的M2闪存快是真快
但是就目前使用来说,寿命有限
还可能出现密集读写掉盘和强制断电的时候丢数据

继续阅读 →

kernel: nvme nvme0: I/O xxx QID xxx timeout, aborting

10Gbps端口的服务器安装了2块NVME的硬盘
结果频繁的出现问题掉盘的问题

日志如下

Mar 10 13:10:10 10Gbps kernel: nvme nvme0: I/O 183 QID 3 timeout, aborting
Mar 10 13:10:10 10Gbps kernel: nvme nvme0: Abort status: 0x0
Mar 10 13:10:13 10Gbps kernel: nvme nvme0: I/O 384 QID 4 timeout, aborting
Mar 10 13:10:13 10Gbps kernel: nvme nvme0: Abort status: 0x0
Mar 10 13:10:14 10Gbps kernel: nvme nvme0: I/O 626 QID 5 timeout, aborting
Mar 10 13:10:14 10Gbps kernel: nvme nvme0: Abort status: 0x0
Mar 10 13:10:15 10Gbps kernel: nvme nvme0: I/O 879 QID 7 timeout, aborting
Mar 10 13:10:15 10Gbps kernel: nvme nvme0: Abort status: 0x0
Mar 10 13:10:28 10Gbps kernel: nvme nvme0: I/O 221 QID 5 timeout, aborting
Mar 10 13:10:28 10Gbps kernel: nvme nvme0: Abort status: 0x0
Mar 10 13:10:34 10Gbps kernel: nvme nvme0: I/O 510 QID 1 timeout, reset controller
Mar 10 13:10:55 10Gbps kernel: nvme nvme0: Device not ready; aborting reset, CSTS=0x1
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 271133736 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 2052266888 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 2175930376 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 7072889400 op 0x0:(READ) flags 0x80700 phys_seg 17 prio class 0
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 238328656 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 3954686056 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 6440531640 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 7301389616 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 6288979456 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
Mar 10 13:10:55 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 2149595472 op 0x0:(READ) flags 0x80700 phys_seg 6 prio class 0
Mar 10 13:11:16 10Gbps kernel: nvme nvme0: Device not ready; aborting reset, CSTS=0x1
Mar 10 13:11:16 10Gbps kernel: nvme nvme0: Removing after probe failure status: -19
Mar 10 13:11:36 10Gbps kernel: nvme nvme0: Device not ready; aborting reset, CSTS=0x1
Mar 10 13:11:36 10Gbps kernel: print_req_error: 6 callbacks suppressed
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 2000203632 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 0
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 68158880 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 0
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 4036854464 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 0
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 78773728 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 0
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 1987798736 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 0
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 1986001320 op 0x0:(READ) flags 0x1000 phys_seg 1 prio class 0
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 4082978496 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 0
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 5906970992 op 0x0:(READ) flags 0x1000 phys_seg 1 prio class 0
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 3962823040 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 0
Mar 10 13:11:36 10Gbps kernel: blk_update_request: I/O error, dev nvme0n1, sector 6902965512 op 0x1:(WRITE) flags 0x100000 phys_seg 40 prio class 0
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): metadata I/O error in “xfs_trans_read_buf_map” at daddr 0x160153970 len 8 error 5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): metadata I/O error in “xfs_trans_read_buf_map” at daddr 0xf09d82c0 len 32 error 5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): metadata I/O error in “xfs_trans_read_buf_map” at daddr 0x98fd6a0 len 32 error 5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): metadata I/O error in “xfs_trans_read_buf_map” at daddr 0x4b1fde0 len 32 error 5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: nvme0n1: writeback error on inode 6619987520, offset 0, sector 6902965832
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): log I/O error -5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): metadata I/O error in “xfs_trans_read_buf_map” at daddr 0xec33e180 len 32 error 5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_do_force_shutdown(0x2) called from line 1250 of file fs/xfs/xfs_log.c. Return address = 00000000147aed99
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): Log I/O Error Detected. Shutting down filesystem
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): Please unmount the filesystem and rectify the problem(s)
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): log I/O error -5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): log I/O error -5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): log I/O error -5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): log I/O error -5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): log I/O error -5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): log I/O error -5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): log I/O error -5
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:36 10Gbps kernel: nvme0n1: writeback error on inode 77133302, offset 0, sector 684881640
Mar 10 13:11:36 10Gbps kernel: XFS (nvme0n1): xfs_imap_to_bp: xfs_trans_read_buf() returned error -5.
Mar 10 13:11:39 10Gbps kernel: VFS: busy inodes on changed media or resized disk nvme0n1
Mar 10 13:11:39 10Gbps kernel: nvme nvme0: failed to set APST feature (-19)
Mar 10 13:11:39 10Gbps systemd[1]: Stopped target Local File Systems.

https://forums.unraid.net/topic/92924-solved-sudden-problems-when-starting-vms/
这里也有同类错误,

分析了原因
大部分是密集型读写引起的
这个是CDN缓存节点,密集型读
NVME温度比较高,持续的话就开始节流
然后慢慢崩溃了
而且因为这个是ADATA的XPG消费级产品,不是企业级的

解决问题
1. 替换为三星的PRO系列 , 因为另外2台使用三星产品的并无问题
2. 尝试增加散热


Linux的Swap空间需要设置多大?

我们看看redhat的官方答复是怎么说的:

Amount of RAM in the system 物理内存Recommended swap space建议的交换空间大小Recommended swap space if allowing for hibernation如果开启休眠功能建议的交换空间大小
⩽ 2GB2 times the amount of RAM3 times the amount of RAM
> 2GB – 8GBEqual to the amount of RAM2 times the amount of RAM
> 8GB – 64GBAt least 4 GB1.5 times the amount of RAM
> 64GBAt least 4 GBHibernation not recommended

总结起来就是,如果不打算开启休眠功能,物理内存在8G以下,则swap设置为与物理内存一样大。如果物理内存在8G以上,swap空间设置为8G即可。当物理内存大于64G时,不建议开启休眠功能。

以下是Ubuntu的指南,更加细致:(从左至右依次是RAM大小,不开启休眠,开启休眠,最大值)

参考链接如下:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/s2-diskpartrecommend-ppc#id4394007

https://help.ubuntu.com/community/SwapFaq