本帖最后由 aries_jo 于 2009-11-18 23:43:36 编辑

解决方案 »

  1.   

    检查一下你的max_connections 的设置mysql> show variables like 'max_connections';
    +-----------------+-------+
    | Variable_name   | Value |
    +-----------------+-------+
    | max_connections | 100   |
    +-----------------+-------+
    1 row in set (0.00 sec)mysql>
      

  2.   


    在mysql中 show processlist;
    然后 KILL [CONNECTION | QUERY] thread_id
     把不需要的杀掉。
      

  3.   


    已经是768了问题1、怎么查询已经上线人数呢?
    问题2、应该设置多少才合理呢?mysql> show variables like 'max_connections'; 
    +-----------------+-------+
    | Variable_name   | Value |
    +-----------------+-------+
    | max_connections | 768   | 
    +-----------------+-------+
    1 row in set (0.00 sec)
      

  4.   

    建议检查你的程序,一般来说WEB访问数据库,你不需要这么多同时的连接吧。1。 调大这个数,至于多少,逐步加起来看看,先到1000,再不行再上调。
    2。 检查你的程序,使用完数据库后有没有释放连接?
      

  5.   


    mysql中的只有一条,刚查看了netstat -an还存在很多感觉没有自动释放掉,同时再网页中提交数据还是提示1114代码(网站人在线达到上限 )。
    请问这个问题怎么处理呢?mysql> show processlist; 
    ERROR 2006 (HY000): MySQL server has gone away
    No connection. Trying to reconnect...
    Connection id:    53
    Current database: *** NONE ***+----+------+-----------+------+---------+------+-------+------------------+
    | Id | User | Host      | db   | Command | Time | State | Info             |
    +----+------+-----------+------+---------+------+-------+------------------+
    | 53 | root | localhost | NULL | Query   |    0 | NULL  | show processlist | 
    +----+------+-----------+------+---------+------+-------+------------------+
    1 row in set (0.00 sec)
      

  6.   

    1、有办法查询'max_connections'占用数量吗?
    2、程序中是有释放功能的,是采用discuz的Mysql类写的。
      

  7.   


    分别有单条和批量数据写入。
    单条写入时候没有出现错误提示。
    当批量写入的时候,出现 Error "the table 'user_table' is full" 错误,就是我上面说的1114错误了。
    1请问、我服务器空间500G的怎么会出现full呢?