Errors / checked October 9, 2026

curl: (52) Empty reply from server

The error

Output of a curl call when the server accepted the connection and then closed it without sending any response. Common in cron jobs that call an app during a deploy or a crash.

Quick fix

  1. Check the server's logs at the time of the call: a process that crashed, ran out of memory or was restarted mid-request closes the connection with nothing sent.
  2. Check any proxy or load balancer in front of it: one that drops a request (too slow, too large, failed health check) can close the connection without a response.
  3. If it only happens sometimes, retry it. Plain --retry does not count exit code 52 as transient, so use --retry 3 --retry-all-errors, for calls that are safe to repeat (it can send the request twice).

Why this happens

Exit code 52 means the server did not reply anything. The TCP connection worked (otherwise you would see error 7), but no HTTP status line came back before the connection closed, so curl has no response to show.

Source: curl man page: exit codes

Other solutions

  • A job that hits the endpoint during every deploy will fail on every deploy. Schedule around deploys, or make the call retry.
  • For scheduled calls, a hosted scheduler that retries turns a restart into a short delay instead of a missed run. RunLater retries failed calls with exponential backoff, up to 10 times, and logs each attempt with its error.

Check a schedule before you deploy it: the cron expression explainer shows the next 10 run times.

Frequently asked questions

What does curl error 52 mean?

The server did not reply anything: it closed the connection without sending a response. It is exit code 52 in the curl man page.

Is error 52 a problem with curl?

Almost never. curl connected and sent the request; the server side closed the connection. Look at the server, the app process and any proxy in front of it.

How is 52 different from 7 and 28?

Error 7 means the connection itself failed. Error 28 means curl gave up waiting. Error 52 means the connection worked and the server closed it without answering.

Have the URL called on schedule, with retries

RunLater calls your URL on a cron schedule or at an exact time, in your timezone, retries failed calls with backoff and logs each response, so a timeout or a 5xx shows up in a log instead of disappearing.

Start a 14-day trialStarter is $15/month for 250 scheduled requests and 25,000 runs. Cancel before day 14 and you pay nothing.

Related errors