![[warn] mod_fcgid: read data timeout in 45 seconds](http://sys-guard.com/contents/wp-content/uploads/2015/09/plesk12_upload_error.png)
大量画像同時登校時のエラー
お客さんから障害時の詳細な時間を教えて貰えたので該当日時付近のログをチェックする。
ログの確認
# tail -n 1000 /var/www/vhosts/system/hogehoge.com/logs/error.log [warn] [client 124.xxx.yyy.33] mod_fcgid: read data timeout in 45 seconds, referer: http://hogehoge.com/wp-admin/media-upload.php?post_id=17361&type=image&tab=type [error] [client 124.xxx.yyy.33] Premature end of script headers: async-upload.php, referer: http://hogehoge.com/wp-admin/media-upload.php?post_id=10000&type=image&tab=type
FastCGIの実行時間の45秒制限によるものでした。今回のように不具合の細やかな報告を頂けるので有難いです。
# cat /etc/httpd/conf.d/fcgid.conf
# This is the Apache server configuration file for providing FastCGI support
# via mod_fcgid
#
# Documentation is available at http://fastcgi.coremail.cn/doc.htm
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>
FcgidIPCDir /var/run/mod_fcgid/sock
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm
FcgidIdleTimeout 40
FcgidProcessLifeTime 30
FcgidMaxProcesses 20
FcgidMaxProcessesPerClass 8
FcgidMinProcessesPerClass 0
FcgidConnectTimeout 30
FcgidIOTimeout 45
FcgidInitialEnv RAILS_ENV production
FcgidIdleScanInterval 10
</IfModule>
45秒確認
150秒に変更する。
FcgidIOTimeout 45 ↓変更 #FcgidIOTimeout 45 FcgidIOTimeout 150
反映させます。
# /usr/local/psa/admin/bin/httpdmng --reconfigure-all graceful # service httpd graceful
お疲れ様です
スムーズに保守作業が終わりました٩(๑❛ᴗ❛๑)۶ブラウザから大量にアップロードを行うなどの長い実行処理中の不具合はWEBサーバー接続時間制限かプログラム実行時間制限のどちらかが9割
