Cover images fail to load intermittently

Fill out the following bug report template with as much detail as possible!

Are you sure this is a bug? If you just need help, post in the developer help category. If it’s a feature request, head to the ideas category.


Issue Summary

  • Explain roughly what’s wrong
    • Cover images that I add to posts, are failing to load intermittently. This only seems to happen with images that I have uploaded to the post, and its not consistent. Most of the time a refresh will fix the page.
    • When this error occurs you can see an error with the GET in the browser console, under the Network tab. The status of the GET request for image URL will be NS_ERROR_NET_PARTIAL_TRANSFER
    • The images are all .webp format. And not very large, typically < 1mb.
    • Also of note, there never seems to be an issue with the image previews from the /ghost/ admin panel. Only from a visitors perspective.
  • What did you expect to happen?
    • I expect any images I upload to a post to load with all other content.
    • All other content loads without issue, only images are a problem and only intermittently.

Steps to Reproduce

  1. Navigate to https://strifetcg.com/
  2. Look for images that fail to load
    1. The site has a cover image, and every post has one as well. If you don’t see a cover image it failed to load.

Setup information

Ghost Version
6.4.0

Node.js Version
v22.13.1

How did you install Ghost?
Following instructions here: How To Install Ghost On Ubuntu - Ghost Developer Docs

Provide details of your host & operating system
VM host running Proxmox VE 9.0.6
LXC Guest OS: Ubuntu 24.04.3 LTS x86_64
Kernel: 6.14.8-2-pve
Shell: bash 5.2.21
CPU: Intel i5-3470 (1) @ 3.600GHz
GPU: Intel HD Graphics
Memory: 2097MiB / 9216MiB

Database type
MySQL 8

Browser & OS version
Windows 11 Home with several browsers:

  • Firefox 144.0
  • Chroimne 141.0.7390.108

Android:

  • Firefox Beta 145.0b3
  • Chrome 141.0.7390.111

Relevant log / error output
NS_ERROR_NET_PARTIAL_TRANSFER

I don’t have a solution, but maybe something to point you in the right direction.

NS_ERROR_NET_PARTIAL_TRANSFER essentially means that the image download is interrupted. So, something in your stack is causing that.

LXC is not an officially supported installation method and there are certain peculiarities compared to running a full VM.

If you’re running the NGINX inside the LXC, the first question I’d have is…how do the requests get to the LXC? What happens before that? How do requests from the internet reach your network, then the Proxmox host, and then LXC?

Not a solution, but the direction I’d look into.

1 Like

Thank you for the question.

I have a Ubiquity router/firewall and port forwarding configured for 80 & 443 directly to the LXC guest IP address for the vm webhost (running on the physcial Proxmox host).

  • My firewall has a static public IP address (1Gbps symetric up/down).
  • Every Proxmox guest has a dedicated IP address exposed to my internal network.
  • All web requests are routed, and served by the same NGINX instance.

This has been working fine for non-Ghost projects:

  • I also host a second site using Ghost and it has the same issue (https://dixpit.com/)
  • I was previously hosting my site with static pages and did not have any issues.
  • I host a passion project (https://vectorz.io/) which uses a similar stack to Ghost, also with no issues:
    • NGINX reverse proxy
    • Static pages
    • Bun runtime (previously Node) with a custom app/WebSockets

All of these projects are hosted on the same guest. I totally respect the assertion that its something in my stack. The issue is that whatever the compatability problem it only affects Ghost, and only intermittently. Hard to solve for sure, thank you for reading and thinking about it.

It would appear that I fixed this issue. For some reason my stack seems to have issues with buffering Ghost requests while using NGINX as a reverse proxy. I disabled buffering following some advice I read about the NS_ERROR_NET_PARTIAL_TRANSFERerror.

If you have this issue add these two lines in nginx.conf to the block that contains your proxy_pass directive.

proxy_buffering off;
proxy_request_buffering off;

Example:

server {
    server_name domain.com www.domain.com;

    client_body_buffer_size 1024K;
    client_max_body_size 50M;

    location / {
        # ** THESE ARE THE LINES THAT FIXED IT
        proxy_buffering off;
        proxy_request_buffering off;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;

        proxy_pass http://127.0.0.1:2369/;
    }

    listen 443 ssl; # managed by Certbot
    #There will be SSL cert config stuff here...
}
1 Like