最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

/etc/php-fpm.d/www.conf 配置注意事項(xiàng)

 更新時間:2017年02月04日 11:03:02   投稿:jingxian  
下面小編就為大家?guī)硪黄?etc/php-fpm.d/www.conf 配置注意事項(xiàng)。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧

1、php-fpm 配置文件里 rlimit_files的值 要與系統(tǒng)的打開連接數(shù)一致

1)查看系統(tǒng)文件打開連接數(shù)

[root@iZ94eveq0q4Z ~]# ulimit -n
65535

2)查看一下php-fpm 配置文件里 rlimit_files的值

; Set open file descriptor rlimit#rlimit設(shè)置打開的文件描述符
; Default Value: system defined value
rlimit_files = 65535
如果兩個值不一樣,則要設(shè)置為一樣

方法如下:

3)設(shè)置系統(tǒng)打開文件連接數(shù)

[root@hotdata ~]# ulimit -HSn 65535
[root@hotdata ~]# ulimit -n
65535
[root@hotdata ~]#

設(shè)置好后重啟php-fpm服務(wù)

2、 request_terminate_timeout = 0 設(shè)置為0

; The timeout for serving a single request after which the worker process will
; be killed. This option should be used when the ‘max_execution_time' ini option
; does not stop script execution for some reason. A value of '0′ means ‘off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
request_terminate_timeout = 0

因?yàn)檫@個參數(shù)會直接殺掉php進(jìn)程,然后重啟php進(jìn)程,這樣前端nginx就會返回104: Connection reset by peer。這個過程是很慢,總體感覺就是網(wǎng)站很卡

nginx可能出現(xiàn)502
recv() failed (104: Connection reset by peer) while reading response header from upstream

3、request_slowlog_timeout這個配置不要開啟

之前服務(wù)器上開始了這個參數(shù),并且設(shè)置如下:

request_slowlog_timeout = 10導(dǎo)致圖片處理每次都失敗,每次都是502錯誤。

錯誤信息如下:

Nginx的錯誤信息:
2015/12/28 16:20:23 [error] 649#0: *9862 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 163.177.69.13,

php-fpm的錯誤信息為:

[28-Dec-2015 17:04:01] WARNING: [pool www] child 10520, script '/hotdata/kehu/foshang_niufeecms/index.php' (request: "GET /index.php") execution timed out (10.451550 sec), terminating
[28-Dec-2015 17:04:01] WARNING: [pool www] child 10512, script '/hotdata/kehu/foshang_niufeecms/index.php' (request: "GET /index.php") execution timed out (12.396650 sec), terminating
[28-Dec-2015 17:04:01] WARNING: [pool www] child 10520 exited on signal 15 (SIGTERM) after 73.413706 seconds from start
[28-Dec-2015 17:04:01] NOTICE: [pool www] child 10909 started
[28-Dec-2015 17:04:01] WARNING: [pool www] child 10512 exited on signal 15 (SIGTERM) after 73.421170 seconds from start
[28-Dec-2015 17:04:01] NOTICE: [pool www] child 10910 started/var/log/php-fpm/www-slow.log記錄如下

[28-Dec-2015 16:23:17]  [pool www] pid 2427
script_filename = /hotdata/kehu/foshang_niufeecms/index.php
[0x00007f94070ff668] file_get_contents() /hotdata/kehu/foshang_niufeecms/index/Lib/Action/MemberAction.class.php:516
[0x00007f94070ff140] makecar() /hotdata/kehu/foshang_niufeecms/index/Lib/Action/MemberAction.class.php:623
[0x00007fff6b5bd870] ajaxMakeCart() unknown:0
[0x00007f94070fde48] invoke() /hotdata/kehu/foshang_niufeecms/core/Lib/Core/App.class.php:171
[0x00007f94070fdc70] exec() /hotdata/kehu/foshang_niufeecms/core/Lib/Core/App.class.php:207
[0x00007f94070fda98] run() /hotdata/kehu/foshang_niufeecms/core/Lib/Core/Think.class.php:39
[0x00007f94070fc610] start() /hotdata/kehu/foshang_niufeecms/core/Common/runtime.php:242
[0x00007f94070fbef8] +++ dump failed

所以最好是要這個設(shè)置給屏蔽掉。
;request_slowlog_timeout = 10

以上這篇/etc/php-fpm.d/www.conf 配置注意事項(xiàng)就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • PHP is_numeric()函數(shù)用法詳解

    PHP is_numeric()函數(shù)用法詳解

    is_numeric()函數(shù)是PHP中的內(nèi)置函數(shù),用于檢查傳入函數(shù)中作為參數(shù)的變量是數(shù)字還是數(shù)字字符串,該函數(shù)返回一個布爾值,本文就給大家講講PHP is_numeric()函數(shù)使用方法,需要的朋友可以參考下
    2023-07-07
  • php session實(shí)現(xiàn)多級目錄存放實(shí)現(xiàn)代碼

    php session實(shí)現(xiàn)多級目錄存放實(shí)現(xiàn)代碼

    這篇文章主要介紹了php session實(shí)現(xiàn)多級目錄存放實(shí)現(xiàn)代碼,需要的朋友可以參考下
    2016-02-02
  • PHP生成plist數(shù)據(jù)的方法

    PHP生成plist數(shù)據(jù)的方法

    這篇文章主要介紹了PHP生成plist數(shù)據(jù)的方法,可實(shí)現(xiàn)PHP數(shù)組轉(zhuǎn)換為蘋果plist XML或文本格式的功能,需要的朋友可以參考下
    2015-06-06
  • PHP之變量、常量學(xué)習(xí)筆記

    PHP之變量、常量學(xué)習(xí)筆記

    親密接觸PHP之變量、常量學(xué)習(xí)筆記(閱讀筆記自PHP手冊) PHP 中一個美元符號($)后面跟上一個變量名稱,即表示一個變量。變量的名稱是對大小寫敏感的。其中變量名允許數(shù)字或下劃線打頭。
    2008-03-03
  • 一篇入門的php Class 文章

    一篇入門的php Class 文章

    一篇入門的php Class 文章...
    2007-04-04
  • PHP中Cookie的使用詳解(簡單易懂)

    PHP中Cookie的使用詳解(簡單易懂)

    本篇文章主要介紹了PHP中Cookie的使用:添加/更新/刪除/獲取Cookie及自動填寫該用戶的用戶名和密碼和判斷是否第一次登陸,具有很好的參考價值。下面跟著小編一起來看下吧
    2017-04-04
  • php寫的帶緩存數(shù)據(jù)功能的mysqli類

    php寫的帶緩存數(shù)據(jù)功能的mysqli類

    本文分享一個帶緩存數(shù)據(jù)功能的mysqli類,非常好用
    2012-09-09
  • PHP基于GD2函數(shù)庫實(shí)現(xiàn)驗(yàn)證碼功能示例

    PHP基于GD2函數(shù)庫實(shí)現(xiàn)驗(yàn)證碼功能示例

    這篇文章主要介紹了PHP基于GD2函數(shù)庫實(shí)現(xiàn)驗(yàn)證碼功能,簡單介紹了GD2函數(shù)庫的常用函數(shù),并結(jié)合實(shí)例形式分析了php實(shí)現(xiàn)驗(yàn)證碼功能相關(guān)操作技巧,需要的朋友可以參考下
    2019-01-01
  • 基于empty函數(shù)的輸出詳解

    基于empty函數(shù)的輸出詳解

    本篇文章是對empty函數(shù)的輸出進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
    2013-06-06
  • PHP session反序列化漏洞深入探究

    PHP session反序列化漏洞深入探究

    這篇文章主要介紹了PHP session反序列化漏洞,我們一般利用反序列漏洞,一般都是借助unserialize()函數(shù),不過隨著人們安全的意識的提高這種漏洞利用越來越來難了
    2022-11-11

最新評論

鸡东县| 莱州市| 万源市| 崇州市| 大理市| 彰武县| 城市| 晴隆县| 博兴县| 博乐市| 邛崃市| 黄龙县| 淮北市| 涪陵区| 寻甸| 若尔盖县| 宁阳县| 鹿泉市| 怀化市| 台安县| 荣成市| 获嘉县| 剑川县| 深圳市| 霍山县| 孝昌县| 米脂县| 阿克苏市| 乌拉特中旗| 平阳县| 大渡口区| 鲜城| 洛隆县| 南涧| 河曲县| 庆云县| 巴东县| 麻城市| 神池县| 绿春县| 河源市|