Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
"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.
Copy link to clipboard
Copied
Thanks very much for your reply.
How do I go about checking/ fault finding the connections?
Copy link to clipboard
Copied
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?