今天小編要做壓力測試,用了在linux 常的工具 siege ,沒想到一打下去不是網站掛了,而是打不出去
| 
					 1  | 
						[error] descriptor table full sock.c:133: Too many open files  | 
					
在linux 不能難解, 下個ulimit -n xxxx 就好了, 所以我就下了
| 
					 1 2  | 
						ulimit -n 65535 -bash: ulimit: open files: cannot modify limit: Operation not permitted  | 
					
參考這裡
| 
					 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  | 
						sudo -s vim /Library/LaunchDaemons/limit.maxfiles.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0">   <dict>     <key>Label</key>     <string>limit.maxfiles</string>     <key>ProgramArguments</key>     <array>       <string>launchctl</string>       <string>limit</string>       <string>maxfiles</string>       <string>65535</string>       <string>65535</string>     </array>     <key>RunAtLoad</key>     <true/>     <key>ServiceIPC</key>     <false/>   </dict> </plist> #重下 ulimit -n 65535 #檢查 ulimit -a   | 
					
打完收工,但這應該只有單次應用,永遠設定等我研究好再更新
(Visited 556 times, 1 visits today)