0, 先决条件Nginx 依赖 pcre-devel, openssl, openssl-devel安装命令:yum -y install pcre-devel openssl openssl-devel 1,安装1.1, 下载 Nginx,下载地址:http://nginx.org/downloa ...
                            
                            
                                分类:
其他好文   时间:
2017-05-04 12:07:15   
                                阅读次数:
316
                             
                         
                    
                        
                            
                            
                                在linux系统下长时间进行性能測试,连续几次发生server假死无法连接上的情况,无奈仅仅能重新启动server。在測试路径下发现hs_err_pid17285.log文件,打开文件查看其主要内容例如以下:# There is insufficient memory for the Java Ru ...
                            
                            
                                分类:
编程语言   时间:
2017-04-30 11:03:56   
                                阅读次数:
817
                             
                         
                    
                        
                            
                            
                                    如更新忘记更新此文档,请参考链接: http://note.youdao.com/noteshare?id=d9b4d5c0f5991c63c5b8ae965722f619 ...
                            
                            
                                分类:
其他好文   时间:
2017-04-25 16:53:12   
                                阅读次数:
324
                             
                         
                    
                        
                            
                            
                                #include <stdio.h> #include <sys/time.h> #include <sys/resource.h> int main(int argc, char *argv[]) { struct rlimit nofile_rlmt; if (getrlimit(RLIMIT_ ...
                            
                            
                                分类:
系统相关   时间:
2017-04-14 22:01:33   
                                阅读次数:
205
                             
                         
                    
                        
                            
                            
                                一、平台环境 二、环境准备1、 增加系统打开文件数和进程数 在每台服务器命令行执行: ulimit -n 显示当前可以打开的最大文件数 sudo vim /etc/security/limits.conf 在文件中添加 * -	nofile 655350 * -	nproc 655350 然后保存  ...
                            
                            
                                分类:
其他好文   时间:
2017-04-10 18:37:09   
                                阅读次数:
513
                             
                         
                    
                        
                            
                            
                                操作如下: ulimit -a #查看现有各个限制值情况 ulimit -n #查看现有打开文件打开数量最大值 cat /proc/sys/fs/file-max #查看本Linux最大打开文件打开数限制 echo ' * soft nofile 409600 ' >> /etc/security/ ...
                            
                            
                                分类:
系统相关   时间:
2017-04-09 19:41:14   
                                阅读次数:
219
                             
                         
                    
                        
                            
                            
                                1)调整配置文件中的配置项的值(配置文件:nginx.conf) worker_processes auto;开启的进程数,一般配置为跟逻辑CPU核数一样worker_rlimit_nofile 51200;1个nginx进程可打开的最大文件描述符数目的数量 events{	use epoll;设置 ...
                            
                            
                                分类:
其他好文   时间:
2017-04-04 18:29:09   
                                阅读次数:
129
                             
                         
                    
                        
                            
                            
                                直接修改文件“/etc/security/limits.conf”,添加一行如下: * hard nofile 131072 然后“ulimit -a”。再次验证,过。 ...
                            
                            
                                分类:
其他好文   时间:
2017-03-30 14:57:15   
                                阅读次数:
319
                             
                         
                    
                        
                            
                            
                                    出现场景: 在用nginx做负载均衡服务器对系统做并发测试,并发量比较大时Nginx会报出Http 500错误 报错原因: 访问量大的时候,由于系统资源限制,而不能打开过多的文件 原因查找: 打开nginx错误日志(/usr/local/nginx/logs/error.log) 查看是否报too  ...
                            
                            
                                分类:
Web程序   时间:
2017-02-17 17:14:47   
                                阅读次数:
212
                             
                         
                    
                        
                            
                            
                                1、修改ulimit vi /etc/security/limits.conf 增加 * soft nofile 65535 * hard nofile 65535 * - nofile 65535 修改 linux 内核文件 sysctl -P 报错error: "net.bridge.bridg ...
                            
                            
                                分类:
系统相关   时间:
2017-01-03 18:38:28   
                                阅读次数:
269