AWS/Docker: Unable to post the blog on my website through a self hosted ghost page

I am unable to post my recent blog as it is freezing as soon as I push publish button.

I am unable to find the reason behind it, can anyone help me, I am posting a video and an image of frozen screen which shows the error but I am unable to point it out.

Error Screen Record

What does F12 console say about errors?

1 Like


Ok, so looks like a server error, not a problem with proxying. Can you please post the log from ghost on the server that corresponds to when the problem happens? If that’s not informative, starting ghost with ghost run -D causes very verbose logging that can be helpful.

You’ll get better help troubleshooting if you post how you setup ghost.

Here you go, if anyone can help me out with this

It’s looks like bad installation or bad config.

You shouldn’t be able to get your Ghost into a state where the SQL queries are failing like this*. So please share what’s happened to it recently. Did you run an upgrade? Or has it never worked? Or? What did you do just before it broke?

(*Obviously you did! But unless you’re editing the raw SQL in the database, you found a bug somewhere in Ghost, and more information will help the core team figure out where the bug is and how to reproduce it, AND will help forum members tell you what to try next for fixing it.)

Actually we have deployed ghost using docker on aws (using ecs). We have not made any changes to the ghost code or ghost dockerimage code. We just ran a new task definition and since then we are getting this error (or we have just noticed it since then). We have also not interacted with the sql table directly.

@ikarus-akhil Are you the original poster (or helping the original poster with their problem), or are you also reporting the same problem on a different server? It’s helpful to know if the problem is happening to multiple people…

I’ve moved your thread over to Developer help and tagged it as a potential Docker problem, in hopes of making it easier for someone with that expertise to find it. :)

@Cathy_Sarisky I am helping the original poster.

That can’t be docker problem, cuz my scriptmania works on newest ghost version and it’s everythink ok.

@AnimaVillis yes thats what I think too. Also it cannot be a version issue as we have used a specific version of ghost (image version 5) while creating our docker image.

That is actually a pretty unspecific version. The v5-Tag will always be applied to the newest version within the major release (5.x.x).

So, given that there was an update last week (v5.76.0), your v5 actually turned from v5.75.3 to v5.76.0.

Since you mentioned that you’re creating your own docker image, what modifications do you make to the base image?

The image that we have pushed on ECR has ghost version 5.74.5. It was pushed to ECR on November 30 and has been the same since then.

In our docker image, we have just used the following ghost base image:
FROM ghost:5

Also, we have just configured our own RDS table in the docker file.

Alright, that’s weird, because ECR also just syncs with the Docker library and already has v5 published the same day as v5.76.0:

Can you tell us what specifically you ran there? I am far from an expert in AWS, but reading the general overview for task definitions, I can see some things that could theoretically impact an SQL query (networking, resource allocation being the first that come to my mind).

So what I have done is first I created a docker image of ghost (using ghost:5 as the base image), added my custom theme and some db configurations, and in the end, I wrote the following command:

CMD [“node”, “current/index.js”]

Then I pushed the image to ECR, and then in my ECS I created a new task definition using this ECR image (the one that I pushed to ECR). Also the image has been there on ECR since 30th November.

Alright, then I am also out of ideas, sorry.

Any chance you have a backup you can use?

No I haven’t taken any backup yet.

Could You paste docker file or docker-compose?

Here is the Dockerfile code:

FROM ghost:5

ENV NODE_ENV=production

RUN mkdir -p /var/lib/ghost/content/themes/spotlight-media-theme && ghost config url

COPY ./routes.yaml /var/lib/ghost/content/settings/

COPY . /var/lib/ghost/content/themes/spotlight-media-theme/

ENV database__client=mysql


ENV database__connection__user=username

ENV database__connection__password=password

ENV database__connection__database=table_name

### S3 Config ###

ENV storage__active="s3"







### EMAIL Config ###

ENV mail__transport="SMTP"

ENV mail__from="from"

ENV mail__options__host="host"

ENV mail__options__port="port"

ENV mail__options__auth__user="email"

ENV mail__options__auth__pass="pass"

WORKDIR /var/lib/ghost

RUN npm install ghost-storage-adapter-s3 \

&& mkdir -p ./content/adapters/storage \

&& cp -r ./node_modules/ghost-storage-adapter-s3 ./content/adapters/storage/s3

CMD ["node", "current/index.js"]