Skip to main content
Inspiring
March 2, 2011
Question

Connection reset by peer socket write error - Sql server error

  • March 2, 2011
  • 1 reply
  • 3034 views

Hi Folks

I keep getting the error above recently, if I take out this query all the other queries on the page work fine. The query below is highlighted in the error message:

<cfquery name="calendar" datasource="calendar">
SELECT *
FROM events
WHERE
(eventstart BETWEEN #weekstart# AND #weekend#
OR eventend BETWEEN #weekstart# AND #weekend#)
AND (eventend >= #currentdate#) <<<< this line of code is highlighted in the error message
AND (eventgp = 0 OR eventgp is null)
AND eventhide != 1
ORDER BY eventstart
</cfquery>

That code has been working fine for the past two years, however its just started to appear very frequently.

Can anyone please help?

Many thanks


This topic has been closed for replies.

1 reply

Owainnorth
Inspiring
March 2, 2011

"Connection reset by peer" is a networking issue generally, and is certainly nothing to do with your SQL.

I'd assume the database is on a different server to CF? If so, start debugging the network. If not, check the necessary connectors to the database.

matthiscoAuthor
Inspiring
March 2, 2011

Thanks very much for your reply.

How do I go about checking/ fault finding the connections?

Owainnorth
Inspiring
March 2, 2011

That's a whole big subject there, but I'd start by looking into network monitoring software, possibly an app or script that pings one server from the other and alerts you if it can't, something like that.

Beyond that, possibly look at SQL error logs, see if there's anything in there?

To be honest, it's rarely easy to diagnose. Are the two boxes located physically close to each other, and what infrastructure is between them?