首頁 美術繪圖 | 美術設計 | 熱門標籤 | 首選 | 首頁宣傳 | 近期作品 論壇: 發表 | 美術工作 | 美術比賽 | 展覽活動 | 美術相關 | 一般討論 | 美術同好 CG 討論 :: Photoshop | Painter | 3D 行動 | AMP

【 立即註冊 】 : 更改個人資料 : : 登入

會員名稱: 登入密碼: 保持登入
Type(Type) 所有的發表文章

前往頁面 ←上一頁  1 ... 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ... 555  下一頁→

不晚不晚,never too late.

新年快樂! 😁(2023-03-16 19:18)

❤️ ❤️(2023-03-15 20:37)

❤️ ❤️(2023-03-15 08:50)

❤️ ❤️ ❤️(2023-03-15 08:49)

❤️ ❤️(2023-03-11 15:30)

❤️ ❤️(2023-03-11 15:29)

❤️ ❤️(2023-03-11 15:29)

👍(2023-03-11 15:23)

[h2]Possible Symptoms[/h2]

代碼:


# You use compser to install Google Cloud API but you will see a lot of CLOSE_WAIT pending when doing "lsof" connect to "1e100.net"

# and then, these CLOSE_WAIT + (ESTABLISHED) will be exceed 1024

# Very likely you will see Too many open files.


$ lsof | grep -i '1e100.net'

php TCP YOUR_HOSTNAME:36144->nuq04s42-in-x0a.1e100.net:https (CLOSE_WAIT)
php TCP YOUR_HOSTNAME:36152->nuq04s42-in-x0a.1e100.net:https (CLOSE_WAIT)
php TCP YOUR_HOSTNAME:36156->nuq04s42-in-x0a.1e100.net:https (CLOSE_WAIT)
php TCP YOUR_HOSTNAME:36160->sfo03s24-in-x0a.1e100.net:https (CLOSE_WAIT)
php TCP YOUR_HOSTNAME:36160->sfo03s24-in-x0a.1e100.net:https (CLOSE_WAIT)



PHP Warning:  include(/YOUR-WORKING-FOLDER/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php): Failed to open stream: Too many open files in /YOUR-WORKING-FOLDER/vendor/composer/ClassLoader.php on line 571
PHP Warning:  include(): Failed opening '/YOUR-WORKING-FOLDER/vendor/composer/../guzzlehttp/guzzle/src/Exception/ConnectException.php' for inclusion (include_path='.:/usr/share/php') in /YOUR-WORKING-FOLDER/vendor/composer/ClassLoader.php on line 571
PHP Fatal error:  Uncaught Error: Class "GuzzleHttp\Exception\ConnectException" not found in /YOUR-WORKING-FOLDER/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210


$ cat /proc/YOUR_SCRIPT_PID/limit | grep -i 'max open files'
✅ Max open files              1024               1024              files   





[h2]Workaround / Solution[/h2]

Just increase the ulimit.

代碼:

$ vi /etc/security/limits.conf

# -------------------------------------
# ADD the following lines, increase the value from 1024 to "16384" or more
# -------------------------------------
*         hard    nofile      16384
*         soft    nofile      16384
root      hard    nofile      16384
root      soft    nofile      16384

$ reboot

$ cat /proc/YOUR_SCRIPT_PID/limit | grep -i 'max open files'
✅  Max open files            16384               16384              files   




(2023-03-05 00:50)

❤️ 😄(2023-02-28 12:49)

👍 👍

這是闖關活動嗎?(2023-02-23 12:17)

👍 👍(2023-02-23 12:16)

👍 👍(2023-02-23 12:16)

👍 👍(2023-02-23 12:16)

❤️ ❤️(2023-02-23 12:12)

😁 😁(2023-02-23 12:12)

👍 👍(2023-02-23 12:11)

❤️ ❤️ ❤️

Love You 兔快樂(2023-02-23 12:10)

So cute 🥰(2023-02-23 12:08)

My Favorite C/C++ indent (TAB=4, Allman Style) since 2005

代碼:


# --------------------------
# Install indent & astyle in RHEL/Fedora/CentOS/AlmaLinux/Ubuntu/Debian
# --------------------------
$ dnf install indent astyle
$ apt install indent astyle

# --------------------------
# then reformat your example.c
# --------------------------

$ indent -nbad -bap -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli4 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l95 -lp -npcs -nprs -npsl -saf -sai -saw -nsc -nsob -nss -ut -ts4  example.c

$ astyle  --style=allman  example.c


(2023-02-17 18:47)

前往頁面 ←上一頁  1 ... 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ... 555  下一頁→