Wagtail (Django) initial load is slow

I have a Wagtail installation on shared hosting that seems to be working but the initial spinup time is very slow (roughly 15-30 seconds). My other Python Django/Flask related projects don’t seem to have this problem. I was wondering if anyone has tried to use Wagtail on a shared host here and had much success.

On the whole I feel like maybe Wagtail is just not suited for shared hosting as they do recommend using redis, but since it does run and when it’s running, it works really well, I feel compelled to ask.

Maybe related: Django site spawning/initial loading slow

On shared hosting, long-running processes are killed at regular intervals or when hitting (global) account memory limits. The only way to avoid these restrictions is to upgrade to VPS/Dedi where you are allowed to run persistent processes and bump your memory requirements to a workable level if necessary.

If memory considerations are not a problem with your Wagtail installation you could try hitting the site every 5 minutes via a crontab in hopes that it will already be loaded and running when your users visit it.

Yeah not using shared is the solution here then. Running crons in this manner is hacky and not sustainable. Things like WordPress work fine on shared. A shame WagTail would not.

If you have time for experimentation you could try loading the app using FastCGI instead of Passenger. It won’t be persistent but it might be less laggy.

Python FastCGI – DreamHost Knowledge Base

1 Like

I’ll give that a shot.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.