如题

解决方案 »

  1.   

    mysql的默认连接数一般是151,最大具体不知道多少
      

  2.   

    适当增加max connetions,
    set global max_connections = 1024;
    并发连接不仅仅是硬件配置,和应用、操作系统都有关系
    MYSQL HELP:
    The number of connections allowed is controlled by the max_connections system variable. Its default value is 100. If you need to suppor t more connections, you should restart mysqld with a larger value for this variable. 
    The maximum number of connections MySQL can support depends on the quality of the thread library on a given platform. Linux or Solaris should be able to support 500-1000 simultaneous connections, depending on how much RAM you have and what your clients are doing. Static Linux binaries provided by MySQL AB can support up to 4000 connections.
      

  3.   

    这要看机器配置  可以用sysbench做压力测试 看看最大能多少ops
      

  4.   

    最大值受你的内存限制。你可以配置你的max connetions参数无限大,但每多一个并发连接,MYSQL就会分配内存给这个SESSION。