zoukankan      html  css  js  c++  java
  • fork failed.: Cannot allocate memory

    在做压力测试时候:

    [root@666 ok]# webbench -c 5000 -t30 http://10.100.0.61/
    Webbench - Simple Web Benchmark 1.5
    Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
    
    Benchmarking: GET http://10.100.0.61/
    5000 clients, running 30 sec.
    
    Speed=176440 pages/min, 4025737 bytes/sec.
    Requests: 88219 susceed, 1 failed.
    [root@666 ok]# webbench -c 50000 -t30 http://10.100.0.61/
    Webbench - Simple Web Benchmark 1.5
    Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
    
    Benchmarking: GET http://10.100.0.61/
    50000 clients, running 30 sec.
    problems forking worker no. 6594
    fork failed.: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    ....
    bash: cannot make pipe for command substitution: Too many open files
    

     查询pid_max值:

    [root@666 ok]# sysctl kernel.pid_max
    kernel.pid_max = 32768
    

     修改pid_max的值:

    [root@666 ok]# sysctl -w kernel.pid_max=60000
    kernel.pid_max = 60000
    [root@666 ok]# sysctl kernel.pid_max
    kernel.pid_max = 60000
    
    [root@666 ok]# echo 'kernel.pid_max=9999' >>/etc/sysctl.conf 
    [root@666 ok]# sysctl -p
    kernel.pid_max = 9999
    
  • 相关阅读:
    [转]vs2010 快捷键大全
    oracle 分组排序
    jqGrid如何实现单选。
    WCF 服务调用RFC 出现异常
    c语言修饰符总结const、static、volatile、auto、extern、register
    BL和LDR——位置无关码和位置相关码
    原码,反码,补码(二)
    原码补码反码
    C语言内存分布
    ARM总线架构(S3C2440)
  • 原文地址:https://www.cnblogs.com/bass6/p/7102524.html
Copyright © 2011-2022 走看看