Support » Developing with WordPress » ECONNRESET when posting via XMLRPC or REST API

  • Issue: When I send a blog post from my nodejs server, I get a response “ECONNRESET” and socket hangup. It happens when I initially get posts from the website too but is fine the second time. Intermittent issue.

    My WordPress site is hosted through Managed WordPress with Godaddy. I contacted their support to see if modsecurity was causing the issue but they said it’s not showing in their logs that it triggered.

    Here’s my REST API call:

    const result = await fetch("${sendToWordpressUrl}/wp-json/wp/v2/posts", {
                    method:     "post",
                    body:       JSON.stringify(postValues),
                    headers:    {
                        'Content-Type':     'application/json',
                        Authorization:      "Bearer ${jwtToken}",
                        'Content-Length':   JSON.stringify(postValues).length
                }).then(res => res.json());

    It also happens via XMLRPC too.

    The weird part is I can post using my local machine though. Mainly an issue with my production server (Meteor Cloud)

    • This topic was modified 2 weeks, 1 day ago by kartboy16.
Viewing 1 replies (of 1 total)
  • Dion


    Sounds to me like WordPress is working fine, and you have a problem on your nodejs server. Connection Reset errors are usually caused by a TLS handshake issue, so it would be worthwhile checking your nodejs SSL/TLS configuration.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.