Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /home/blog66rr/public_html/wp-content/advanced-cache.php:24) in /home/blog66rr/public_html/wp-includes/feed-rss2.php on line 8
memory – unethost無限空間虛擬主機 技術分享部落格 https://blog.unethost.com unethost 專注於提供優質的虛擬主機服務及相關問題解答 Mon, 28 Mar 2016 07:34:09 +0000 zh-TW hourly 1 https://wordpress.org/?v=6.0.8 如何設定排程 cron jobs,解決fastcgi崩潰問題? https://blog.unethost.com/how_to_setup_cron_jobs_to_fix_fastcgi_loading_issue_on_linux/ Mon, 28 Mar 2016 07:31:47 +0000 http://blog.unethost.com/?p=3124 閱讀全文 如何設定排程 cron jobs,解決fastcgi崩潰問題?]]> crontab_wp

我們曾在 php handler 介紹過相關的php型態。

其中有提到 fastcgi的崩潰狀況,
使用fastcgi可能因此導致server loading問題。
最近有讀者來詢問,該如何處理這個狀況呢?

在本篇裡,我們另外給大家另一個思維:

首先要先觀察,這個loading問題是無時無刻發生,
還是透過壓力累積(間歇性)後才會發生的呢?

 

如果是間歇式的,建議在排程裡加上清除php的語法,或許就能解決:

1.登入linux shell,並執行 crontab -e。(我們是用centos為範本)

2. 在其中一行裡,擺上這個語法:
0 */1 * * * /usr/bin/pkill -f -x /usr/bin/php -P 1

3.排程的時間也可以自訂,讓server自動去進行 kill php 的動作。

 

如果是無時無刻的發生呢?

1.這樣透過排程,進行kill php 的效果可能不是最佳。

2.需改以top指令觀察,看看是cpu,memory還是(hd,io),
哪一個部份去咬住了主機資源,在對症調整系統,程式,或升級硬體,
才會有效果。

 

(本篇教學由unethost.com客服撰寫)

延伸閱讀:如何備份Cpanel後台安裝的套裝程式?

安裝上述的軟體,我們提供虛擬主機試用,七天滿意保證,
功能完整使用不受限制,歡迎點我申請。

]]>