最近网站总是报数据库连接数不够,我查看了下数据库的一些数据
max_connections = 800
max_used_connections = 15
Treads_created=15目前网站使用人数肯定有好几百个,我想知道为什么后面两个值只有15呢?这两个值受哪个控制呢?

解决方案 »

  1.   

    max_used_connections 
    从MYSQL本次开机以来,历史数据中的最大同时的并发联接数。Treads_created
    同时打开的表数
      

  2.   

    max_used_connections
    The maximum number of connections that have been in use simultaneously since the server started.
    MySQL服务器过去的最大连接数
    并发不高
    Treads_created=15
    建立 的线程
      

  3.   

    二楼关于 Treads_created 解释错误。 另外是Threads_created 
    Threads_created  是当前MYSQL系统打开的用于用户连接的线程数总体来说,你的MYSQL的并发访问程序并不高。 你是怎么得到 "最近网站总是报数据库连接数不够" 这个信息的? 
    Max_used_connections The maximum number of connections that have been in use simultaneously since the server started. 
    Threads_created 

    The number of threads created to handle connections. If Threads_created is big, you may want to increase the thread_cache_size value. The cache miss rate can be calculated as Threads_created/Connections. 
      

  4.   

    tomcat抛出来的呀
    打开数据库错1:The driver was unable to create a connection due to an inability to establish the client portion of a socket.
    This is usually caused by a limit on the number of sockets imposed by the operating  system. This limit is usually configurable.
      

  5.   

    This is usually caused by a limit on the number of sockets imposed by the operating  system
    操作系统上的问题你的操作系统同时可以支持多少 tcp/ip socket
    检查一下你的操作系统的手册。
    目前看来你的设置是 15
      

  6.   

    那如何更改啊?我对操作系统这方面的设置很不熟悉啊,操作系统是2003 server
      

  7.   

    代码如果是跑在servlet上, servlet线程不退出, 连接就不会断开. 
    必须写代码关闭.
      

  8.   

    关注。我也遇到了,现在还没解决。http://topic.csdn.net/u/20101008/16/c5e0c6be-d3f3-48b9-8934-391e5c9a355e.html
      

  9.   

    我报的是这个错:java.sql.SQLException: null, message from server: "Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug"