Skip to main content
Inspiring
June 5, 2008
Answered

Socket write error - SQL Server

  • June 5, 2008
  • 2 replies
  • 5684 views
Hi,
Just started getting the following error yesterday and now we get them approximately every 2 minutes...

Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver]Connection reset by peer:
socket write error

As far as I know, there haven't been any changes made to either the SQL server, the Coldfusion server, or the coldfusion modules.

If you have any suggestions as to possible causes or how to troubleshoot this problem, that would be greatly appreciated.

Thank you!
This topic has been closed for replies.
Correct answer
This error would indicate something on the mssql side cut the connection. It could be a timeout introduced on the DBMS, a firewall or some other connectivity issue. ColdFusion expects to expire connections and not have them pulled out from under them.

You can disable the 'maintain connections' option of your DSNs. But that will be a big performance hit. If it is a database or firewall timeout have it increased to a reasonable length. ColdFusion defaults to connection timeouts of 20 minutes with an interval of 7 minutes (how often CF looks for connections marked expired and closes them). So, if your DBA instituted a 2 minute timeout - try to have it increased to 5 minutes. Then set your DSN timeouts to 3 minutes and interval to 2.

2 replies

drybagelAuthor
Inspiring
June 11, 2008
I made the changes as suggested and we did notice a significant decrease in the number of socket write errors.

Our servers are maintained at our parent company and we are trying to pinpoint what had changed to have the socket write errors occur. I've been asked if there are any logs that would show how many connections from Coldfusion to the SQL server were made over certain periods of time.

Is there a way to gather this information?

Thank you very much for your help.
Correct answer
June 9, 2008
This error would indicate something on the mssql side cut the connection. It could be a timeout introduced on the DBMS, a firewall or some other connectivity issue. ColdFusion expects to expire connections and not have them pulled out from under them.

You can disable the 'maintain connections' option of your DSNs. But that will be a big performance hit. If it is a database or firewall timeout have it increased to a reasonable length. ColdFusion defaults to connection timeouts of 20 minutes with an interval of 7 minutes (how often CF looks for connections marked expired and closes them). So, if your DBA instituted a 2 minute timeout - try to have it increased to 5 minutes. Then set your DSN timeouts to 3 minutes and interval to 2.