nolo
May 6, 2021, 4:54pm
1
Hello everybody, I have some problems with ghost upload images after upgrade a couples of days ago.
First at all, when I update ghost it crash when so many error and famous message “We’ll be right back” after this I make a fresh ghost install and import my /content/images folder for new one. I reinstall node, ghost-cli, nvm, …
Now my blog works perfectly but I can’t upload images anyway in may posts… ghost error log show:
ERROR “GET /ghost/api/canary/admin/notifications/” 500 223ms
NAME: InternalServerError
MESSAGE: allNotifications.forEach is not a function
My nginx error log show:
2021/05/06 14:17:23 [error] 30072#30072: *4997 upstream prematurely closed connection while reading response header from upstream, client: X, server: blog.manuelfnavas.es, request: "POST /ghost/api/canary/admin/imag$
2021/05/06 14:17:52 [error] 30072#30072: *4997 connect() failed (111: Connection refused) while connecting to upstream, client: X, server: blog.manuelfnavas.es, request: "POST /ghost/api/canary/admin/images/upload/ $
2021/05/06 14:35:34 [error] 30072#30072: *5086 upstream prematurely closed connection while reading response header from upstream, client: X, server: blog.manuelfnavas.es, request: "POST /ghost/api/canary/admin/imag$
2021/05/06 14:35:38 [error] 30072#30072: *5086 connect() failed (111: Connection refused) while connecting to upstream, client:X, server: blog.manuelfnavas.es, request: "GET /ghost/api/canary/admin/posts/?limit=30&$
Any ideas? Thanks in advance
nolo
May 7, 2021, 1:48pm
2
Hi, everybody, I’m trying to resolve this issue with so many different solutions I’m founding in internet.
And I get working upload images if I disable Image optimization in config.production.json adding
“imageOptimization”: {
“resize”: false
}
Any ideas?
Thanks in advance
EDITED: Further information. Disabled image optimization works for post image but not for images in post body which follow crashing site
EDITED 2: Absolutely incredible… trying with removed the /my/path/versions/4.4.0/node_modules/sharp directory then reinstalled sharp via:
npm install sharp
Not working…
Uninstall ghost, delete directory, create new directory and install ghost from 0 and after that import /content/images… same problem
Exactly my issue… I’m running in Docker.
Did the same, expected it to solve things as it temporarily gave me hope during uploading. But as soon as I load the image (the frontend requests the images in different sizes), the entire blog crashes.
I still haven’t been able to solve it. Did you find a fix?
Since the original thread is three years old and not about Docker, could you please start a new post with all the details of your hosting?
Docker folks will likely want to see your docker compose. Might also be helpful to post details about how you upgraded, if the behavior is new after upgrade.
Hey @Cathy_Sarisky ,
I didn’t upgrade, I ran it fresh for the first time.
Here’s the Docker Compose:
services:
ghost:
image: 'ghost:5'
volumes:
- 'ghost-content-data:/var/lib/ghost/content'
environment:
- url=$COMPLETE_FQDN_GHOST
- database__client=mysql
- database__connection__host=mysql
- database__connection__user=$SERVICE_USER_MYSQL
- database__connection__password=$SERVICE_PASSWORD_MYSQL
- 'database__connection__database=${MYSQL_DATABASE-ghost}'
- mail__transport=SMTP
- 'mail__options__auth__pass=${MAIL_OPTIONS_AUTH_PASS}'
- 'mail__options__auth__user=${MAIL_OPTIONS_AUTH_USER}'
- 'mail__options__secure=${MAIL_OPTIONS_SECURE:-true}'
- 'mail__options__port=${MAIL_OPTIONS_PORT:-465}'
- 'mail__options__service=${MAIL_OPTIONS_SERVICE:-Mailgun}'
- 'mail__options__host=${MAIL_OPTIONS_HOST}'
depends_on:
mysql:
condition: service_healthy
healthcheck:
test:
- CMD
- echo
- ok
interval: 5s
timeout: 20s
retries: 10
mysql:
image: 'mysql:8.0'
volumes:
- 'ghost-mysql-data:/var/lib/mysql'
environment:
- 'MYSQL_USER=${SERVICE_USER_MYSQL}'
- 'MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL}'
- 'MYSQL_DATABASE=${MYSQL_DATABASE}'
- 'MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_MYSQLROOT}'
healthcheck:
test:
- CMD
- mysqladmin
- ping
- '-h'
- localhost
interval: 5s
timeout: 20s
retries: 10