In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "what are the precautions for the configuration of / etc/php-fpm.d/www.conf", friends who are interested may wish to take a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the precautions in the / etc/php-fpm.d/www.conf configuration"?
1. The value of rlimit_files in the php-fpm configuration file should be the same as the number of open connections of the system.
1) View the number of connections opened by system files
[root@iZ94eveq0q4Z ~] # ulimit-n
65535
2) check the value of rlimit_files in the php-fpm configuration file
; Set open file descriptor rlimit#rlimit sets the open file descriptor
; Default Value: system defined value
Rlimit_files = 65535
If the two values are not the same, set them to the same
The methods are as follows:
3) set the number of file connections opened by the system
[root@hotdata ~] # ulimit-HSn 65535
[root@hotdata ~] # ulimit-n
65535
[root@hotdata ~] #
Restart the php-fpm service after setting it up
2. Request_terminate_timeout = 0 is set to 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
Because this parameter directly kills the php process, and then restarts the php process, the front-end nginx returns 104: Connection reset by peer. The process is very slow, and the overall feeling is that the website is very slow.
502 may occur in nginx.
Recv () failed (104: Connection reset by peer) while reading response header from upstream
3. Do not enable this configuration of request_slowlog_timeout
This parameter was started on the server earlier, and is set as follows:
Request_slowlog_timeout = 10 causes image processing to fail every time, with a 502 error each time.
The error message is as follows:
Error message for Nginx:
2015-12-28 16:20:23 [error] 6494th: * 9862 recv () failed (9862: Connection reset by peer) while reading response header from upstream, client: 163.177.69.13
The error message for php-fpm is:
[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 record as follows
[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
So it's best to block this setting.
; request_slowlog_timeout = 10
At this point, I believe you have a deeper understanding of "what matters needing attention in the configuration of / etc/php-fpm.d/www.conf". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.