Gabe O'Leary
11/05/2021, 7:49 PM{
clientVersion: "3.3.0"
}
Also I can't repro it locally, it only happen in our production environment which makes it even more difficult to debug...
This happens when I execute a raw query that looks like this:
const query = Prisma.sql`
select url, count(*) as count
from (
select distinct "Status"."userIdStr", "Status".url
from "Status"
where "Status"."createdAt" > (to_timestamp(${startDate.getTime()} / 1000.0))
and "Status".url is not null
) as distinct_user_url_statuses
group by url
having distinct_user_url_statuses.count > 1
order by count desc
limit ${limit}
`;
const data = await prisma.$queryRaw<{ url: string; count: number }[]>(query);
Gabe O'Leary
11/05/2021, 9:51 PMpg
& now this error is thrown:
{
address: "..."
code: "ECONNREFUSED"
errno: -111
port: 7516
syscall: "connect"
}
Gabe O'Leary
11/05/2021, 9:52 PMkopriva.jakub
11/07/2021, 8:44 AM3.3.0
works fine, but it is reproducible on version >=3.4.0