Ghost crashes upon uploading JPEG

  • What version of Ghost are you using? 3.13.4
  • What configuration? Stock configuration using docker image ghost:3 and ghost upgrade
  • What browser? Firefox 75.0 for Manjaro Linux and Google Chrome 73.0.3683.103
  • What errors or information do you see in the console?
Started Ghost Blog.
[2020-04-25 20:52:18] INFO Ghost is running in production...
[2020-04-25 20:52:18] INFO Your site is now available on 
[2020-04-25 20:52:18] INFO Ctrl+C to shut down
[2020-04-25 20:52:18] INFO Ghost boot 4.02s
[2020-04-25 20:52:22] INFO "PUT /ghost/api/v3/admin/posts/5ea49a7ad0b82e00018a3002/" 200 214ms
(node:1) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

and then the server goes down
NGINX error.log:

2020/04/25 22:32:54 [error] 16116#0: *4231 upstream prematurely closed connection while reading response header from upstream, client: 1.2.3.4 server: blog.example.com, request: "POST /ghost/api/v3/admin/images/upload/ HTTP/1.1", upstream: "http://[::1]:8080/ghost/api/v3/admin/images/upload/", host: "blog.example.com", referrer: "http://blog.example.com/ghost/"
2020/04/25 22:32:57 [error] 16116#0: *4240 connect() failed (111: Connection refused) while connecting to upstream, client: 1.2.3.4, server: blog.example.com, request: "PUT /ghost/api/v3/admin/posts/5ea49a7ad0b82e00018a3002/ HTTP/1.1", upstream: "http://127.0.0.1:8080/ghost/api/v3/admin/posts/5ea49a7ad0b82e00018a3002/", host: "blog.example.com", referrer: "http://blog.example.com/ghost/"
2020/04/25 22:32:57 [error] 16116#0: *4240 no live upstreams while connecting to upstream, client: 1.2.3.4, server: blog.example.com, request: "PUT /ghost/api/v3/admin/posts/5ea49a7ad0b82e00018a3002/ HTTP/1.1", upstream: "http://localhost/ghost/api/v3/admin/posts/5ea49a7ad0b82e00018a3002/", host: "blog.example.com", referrer: "http://blog.example.com/ghost/"
  • What steps could someone else take to reproduce the issue you’re having?
    Upload the image https://cruftbusters.com/morrison-co.jpeg to Ghost. Ghost doesn’t crash against all JPEGs but I have a few images that do.

This could be an issue with the version of Node you are running. Could you run the node -v in your command line a reply with the output?

Hi ericalli. Here’s the output

$ node -v
v12.16.2
$ npm -v
6.14.4

Just tried on a new host and new OS. The broken behavior is on CentOS

$ hostnamectl
   Static hostname: -
         Icon name: computer-vm
           Chassis: vm
        Machine ID: -
           Boot ID: -
    Virtualization: kvm
  Operating System: CentOS Linux 8 (Core)
       CPE OS Name: cpe:/o:centos:centos:8
            Kernel: Linux 4.18.0-147.5.1.el8_1.x86_64
      Architecture: x86-64
$ docker -v
Docker version 19.03.8, build afacb8b

Works fine in Debian 10, same Docker build and Ghost image…

$ hostnamectl
   Static hostname: -
         Icon name: computer-vm
           Chassis: vm
        Machine ID: -
           Boot ID: -
    Virtualization: kvm
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-8-cloud-amd64
      Architecture: x86-64
$ docker -v
Docker version 19.03.8, build afacb8b7f0

Probably not Ghost’s problem. Closing this post but I’m glad to document further or answer questions if someone else runs into this issue.