© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•4mo ago•
3 replies
Noel

Errors in websocket worker tail

Workers
I just made my very first websocket worker and deployed it.
It works just fine, however when I tried to see the logs with tail I encountered some strange behavior: no logs show while the connection is active and when i disconnect all log entries show up with two identical errors stating:
Error: The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/
Error: The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/
the linked page stated that I need the following block to prevent this:
server.addEventListener("close", () => {
    server.close();
});
server.addEventListener("close", () => {
    server.close();
});

however after adding it the same issue remains.

Output:
GET https://api-dev.example.com/charger/ocpp?chargerId=1 - Exception Thrown @ 2025. 10. 15. 10:46:16
  (log) OCPP-[C(1)]: Connection attempt.
  (log) OCPP-[C(1)->S]: [2, "36799101", "BootNotification", {...}]
  (log) OCPP-[S->C(1)]: [3,"36799101",{"currentTime":"2025-10-15T08:46:22.779Z","interval":0,"status":"Accepted"}]
✘ [ERROR]   Error: The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/


✘ [ERROR]   Error: The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/
GET https://api-dev.example.com/charger/ocpp?chargerId=1 - Exception Thrown @ 2025. 10. 15. 10:46:16
  (log) OCPP-[C(1)]: Connection attempt.
  (log) OCPP-[C(1)->S]: [2, "36799101", "BootNotification", {...}]
  (log) OCPP-[S->C(1)]: [3,"36799101",{"currentTime":"2025-10-15T08:46:22.779Z","interval":0,"status":"Accepted"}]
✘ [ERROR]   Error: The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/


✘ [ERROR]   Error: The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

workers.api.errors.tail_worker_not_found
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
AWS SDK in Tail Worker?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
Cloudflare Worker Rust Tail Worker
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Websocket worker
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
13mo ago