HI ALL
你们有谁碰到过这个问题没有,我使用的是VS2005 SP1和MYSQL5.0,我有个项目在新增或修改数据时会与后台平凡打交道,最初我在数据库连接字符串中最大连接池设置100,发现连接饱满错误,之后我把连接池(MAX POOL SIZE)加到了300,就发现下面这个错误,找了很多资料,都没有找到解决办法,哪位能帮帮我???????Server Error in '/' Application.
--------------------------------------------------------------------------------Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error:
你们有谁碰到过这个问题没有,我使用的是VS2005 SP1和MYSQL5.0,我有个项目在新增或修改数据时会与后台平凡打交道,最初我在数据库连接字符串中最大连接池设置100,发现连接饱满错误,之后我把连接池(MAX POOL SIZE)加到了300,就发现下面这个错误,找了很多资料,都没有找到解决办法,哪位能帮帮我???????Server Error in '/' Application.
--------------------------------------------------------------------------------Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error:
找到里面对应错误时刻的日志贴出来看看吧
090729 13:37:04 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Normal shutdownInnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
090729 13:38:48 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
090729 13:38:52 InnoDB: Started; log sequence number 0 2765594
090729 13:38:53 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready for connections.
Version: '5.0.67-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL)
MYSQL默人情况下Interactive_timeout和wait_timeout的时间都是28800秒,所以会有很多的连接处于睡眠状态,占用连接池的资源,如果设置小的话,很容易被用完,所以我把这两个参数都缩小到30和60,问题就解决了......