Ask

the edge runtime does not support Node.js crypto module, only in middleware

Recent Next versions have experimental support for running middleware on the Node runtime, which would make the error go away without changing your imports. I would still not reach for it here - opting middleware into Node means your redirect for anonymous users now pays a Node cold start on the path of every request, which is a worse trade than replacing one JWT library.

38 · in/cold-starts ·

2.76s cold start in production, 130ms locally - prisma client on the node runtime

Before optimising, work out how many requests actually hit a cold instance. Add a module-scope const bootedAt = Date.now() and log Date.now() - bootedAt < 1000 as a boolean on every request. On our app the answer was 1.8% of requests, all of them internal health checks and a monitoring probe, and no human had experienced a cold start in a fortnight.

If yours is 2% and none of them are your signup flow, you have a metric, not a problem. If it turns out the first person of the morning is always a customer, that is a different post.

121 · in/cold-starts ·

model passes a comma string where my tool schema says string[], zod to json schema

Also just accept both and normalise. You are validating at the boundary anyway:

const labels = z.preprocess(
  v => typeof v === 'string' ? v.split(',').map(s => s.trim()) : v,
  z.array(z.string())
)

This is not giving up. A retry costs a full round trip, two steps of context and a visibly confused agent; a coercion costs four lines. Fix the schema too, but stop making the user wait for a round trip over a comma.

97 · in/agents-and-mcp ·

still getting too many clients already on the pooled 6543 string at 120 concurrent

Also check whether something else in the same deployment is quietly using the direct connection. Migrations, a seed script, a health check, or the ORM itself for schema introspection - several of them insist on a direct URL and will use DIRECT_URL if it exists in the environment. If a migration runs on deploy while the burst is happening, that is 20 direct connections arriving at the worst moment.

Easiest way to prove it: select count(*), application_name from pg_stat_activity group by 2 during the burst. If you see anything other than what you expect, there is your second client.

132 · in/cold-starts ·

Textile jacket smells like a gym bag, can it go in the machine without killing the waterproofing

I washed mine with normal laundry detergent because I could not be bothered to buy the special stuff, and it did not leak straight away, it just stopped beading. Two months later I found out what that means in a downpour on the M6, which is that the outer soaks up about a kilo of water and you get cold from the inside out even though technically nothing came through. The wash itself is fine. Skipping the reproof is the mistake, and it cost me a genuinely miserable hour.

137 · in/motorcycle-gear ·

Cousin says he clears $150 a day trading with a $6k account, is anybody here actually doing this?

I know two people who do this full time and neither of them would recognise your cousin's description. Both treat it as a job with capital requirements: six figure accounts, defined risk per trade in the small fractions of a percent, and roughly a third of their months are losing ones. Neither has ever described a daily income target, because a daily target is what makes you take a bad trade at 3pm to hit the number. That framing alone is the part I would push back on.

178 · in/money-basics ·

What response time do you promise on the site when support is one person with a day job?

Disagreeing with publishing a number at all. A number on a pricing page is a commitment you will be held to on your worst week, and it buys you approximately nothing at the point of sale, because nobody has ever chosen a twenty pound tool because of the support SLA on the marketing site. What people actually want is an acknowledgement and an honest estimate in the reply itself. Say nothing on the site, over-deliver in the inbox.

163 · in/support-inbox ·