检查一下你的max_connections 的设置mysql> show variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 100 | +-----------------+-------+ 1 row in set (0.00 sec)mysql>
在mysql中 show processlist; 然后 KILL [CONNECTION | QUERY] thread_id 把不需要的杀掉。
已经是768了问题1、怎么查询已经上线人数呢? 问题2、应该设置多少才合理呢?mysql> show variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 768 | +-----------------+-------+ 1 row in set (0.00 sec)
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)
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 100 |
+-----------------+-------+
1 row in set (0.00 sec)mysql>
在mysql中 show processlist;
然后 KILL [CONNECTION | QUERY] thread_id
把不需要的杀掉。
已经是768了问题1、怎么查询已经上线人数呢?
问题2、应该设置多少才合理呢?mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 768 |
+-----------------+-------+
1 row in set (0.00 sec)
2。 检查你的程序,使用完数据库后有没有释放连接?
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)
2、程序中是有释放功能的,是采用discuz的Mysql类写的。
分别有单条和批量数据写入。
单条写入时候没有出现错误提示。
当批量写入的时候,出现 Error "the table 'user_table' is full" 错误,就是我上面说的1114错误了。
1请问、我服务器空间500G的怎么会出现full呢?