52AV手機A片王|52AV.ONE

標題: [crit] open() "/xxxx/yyyy/500.html" failed (24: Too many open files) [打印本頁]

作者: IT_man    時間: 2021-6-3 22:51
標題: [crit] open() "/xxxx/yyyy/500.html" failed (24: Too many open files)
# 看目前系統設定的限制 (ulimit -a # 可查看全部參數)6 _: e# o( i! a. Y  t* ~5 G: S
ulimit -n
8 h( m, _- u3 @9 E1 S1024( i9 a2 b, s$ Q% [, |3 s

  s) ?! z) C  i8 p

: P- H5 Z4 X8 s. ~! v; l# 由 limits.conf 設定 nofile (nofile - max number of open files) 的大小  Q9 b! _8 M4 u7 H" _0 w
vim /etc/security/limits.conf % p( c) N: M7 w; Y" q  C9 e& _/ [
* r( L; }$ {5 j9 |% [
% k/ m: \6 G3 a$ e! u
# 增加/修改 下述兩行 ( 2^20 = 1048576 )
* R: ^- S9 g3 Z4 K% P* soft nofile 1048576$ v7 R: u9 _# O. ~, |. V% K
* hard nofile 1048576
9 D; {; n* C" f* q" p0 j- m% G
0 s( V6 F) X( P- r% i+ Y

1 Q" L! h9 b8 R) i* j# 登出後, 再登入, 執行就會出現此值
! A# C1 @& j! t# Fulimit -n
( ^+ W6 X; c1 S9 t( R1048576/ L, w! ~% E" `3 e. S5 r4 c4 h" n
若 ulimit -n 沒出現 1048576 的話, 可使用強制設定
% D2 P- M+ p6 r0 O0 U" d7 Z* R. a) {& Y+ Q
3 O/ B! T* s. F* \: W5 L
ulimit -n 1048576+ `8 ^6 L2 o' Z, f
+ ?3 B3 k6 h; m; V
" Y; {' h0 I$ C5 p8 l1 N
# 再檢查設定
" l' _6 B# d  h( S: p3 M( [ulimit -n
7 e4 d2 T4 k7 o! D6 q+ o1048576
5 b9 U9 V& G: C/ D0 y* U




歡迎光臨 52AV手機A片王|52AV.ONE (https://www.itech.casa/) Powered by Discuz! X3.2