http://support.microsoft.com/kb/196271
详细说明

解决方案 »

  1.   

    http://www.bianceng.cn/Mysql/index.htm去这看看吧 楼主
      

  2.   

    这可能是由于你的程序通过外部程序获得数据库连接,但是太多的thread阻塞了数据库的访问,可以尝试增大Socket连接数
      

  3.   


    hibernate不是有事务吗?还要自己建connection
      

  4.   

    数据库在unix上么,怎么看着感觉和我遇到过的问题有点类似,连接超限引起数据库无法响应而发生通讯异常,如三楼所说,可能你的连接并不只有70个,如果你是用工具进行并发测试的话,应该运行在已录制的脚本中,你会发现其实页面也会有不少连接存在,如果是基于这种情况,你可以考虑优化一下程序,或者增大套接字连接数来处理。如果你的数据库真的在UNIX上的话,考虑配置下系统内核参数看看
      

  5.   

    可能是我弄错了,不知道mysql有没有linux版本,我碰到过db2在linux上发生过类似错误,只是印象中差不多,呵呵,学习中
      

  6.   


    3楼,能具体一点吗?增大socket连接数。难道是hibernate的开发包限制了 socket连接数?
    我找找看原因,谢谢 3 楼  5楼
      

  7.   

    看了下 hibernate 应该没有限制,估计还是数据库原因导致 建立不了连接,
    有个老外在介绍MySQL时候好像带到了这个错误,他说是什么,甚至给出了解决方法如果client-side 瞬间端口 无法建立,就会抛出像我一样的错误。无法理解我汗。我引用进来 大家帮忙看看One error message I'm proud of in Connector/J is the one that you get when the connection to the database is lost, or can't be made in the first place. The driver knows the various kinds of exceptions that can happen at connect-time (connection refused, bind refused, etc.) and how long it's been since the driver has (ever) communicated with the server. Based on this information it presents different kinds of error messages, and even points to solutions. For example, if there are no client-side ephemeral ports to bind to, the user gets an error message like this:"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. For Unix-based platforms, see the manual page for the 'ulimit' command. Kernel or system configuration may also be required. For Windows-based platforms, see Microsoft Knowledge Base Article 196271 (Q196271)."
    还是找不到,难道还是数据库的问题吗?
      

  8.   

    看你是什么os,是linux的话用ulimit命令,windows的话就看2楼给的那个link,不妨试试:)
      

  9.   

    终于弄好了,谢谢各位 特别是1楼,牛人啊
    这个老外说的也正确,还带点原理。
    http://support.microsoft.com/kb/196271