Forums

Error 504 - LoadBalancer

Hi PythonAnywhere Team!

I'm having an issue with my web app, its been runing for like 7 months i think and today just started to have an error 504 - LoadBalancer, i've been reading that its related to the filesystem.

I've disabled my web app to try to fix any kind of issue with my static files or migrating the sqlite database to mysql that im using but even on the console its taking a lot of time to run a command or even open a file.

Do you think you can help me out?

Thanks in advance!

Hi PythonAnywhere team,

I can confirm the same issue — this looks like a filesystem/storage problem affecting multiple accounts, and it started today.

Account: easyprint1 Web app node: blue-liveweb35 Started: ~17:00 UTC today (July 30). The app had been running fine for months with no code changes or deployments.

Symptoms:

Web app returns 504-backend. The server log shows the WSGI app took 310 seconds to start: WSGI app 0 (mountpoint='') ready in 310 seconds Access log shows requests hitting the 300s frontend timeout (response-time=300.000 → 504), plus 502s during worker respawn and 499s from clients giving up. The slowness reproduces in a Bash console, completely outside the web stack — it's I/O wait, not CPU: $ time python manage.py check (interrupted with Ctrl+C) real 3m19.978s user 0m1.374s sys 0m0.412s

The traceback at interruption shows it was stuck inside importlib._bootstrap_external get_data — i.e. simply reading an ordinary .py file from disk (a module inside openpyxl).

$ time ls -R ~/EasyPrint > /dev/null real 0m27.515s user 0m0.004s sys 0m0.061s

27 seconds of wall time with ~4ms of CPU just to list a directory tree.

$ time python -c "print('hola')" real 0m3.458s

Even a bare Python startup takes 3.5s.

No external APIs, no remote databases — the process is just waiting on file reads. This matches what gcmovil reported above (console slow to run commands or open files). It looks like a degraded file server on your side.

Happy to provide any additional info. Thanks!

Yes, Same issue! account PythonPainting on blue-liveweb40, started ~16:45 UTC, WSGI startup 409s, local SQLite reads timing out

I am getting a Error code: 502-backend error and my website also will not come up.

Web app: writes extremely slow since ~17:00 UTC today (30 July)

My Flask app uses a SQLite database file in my home directory. No code changes or deploys since 11 March; it has been fine for months.

Since roughly 17:00 UTC today, only writes are slow — reads are unaffected. From my access log:

21:34:08 POST (single-row INSERT + commit) response-time=50.863 21:34:09 GET (same page, several SELECTs) response-time= 1.145 21:35:57 GET (serves a 626 KB file) response-time= 0.143

One second apart, same worker, same database file: the write took 50.9s, the read after it 1.1s. Reading the whole 626 KB database off disk takes 0.143s; writing a single ~200 byte row takes 50.8s. The slow route does nothing but connect → one INSERT → commit → close.

Already ruled out on my side: - CPU throttling — dashboard shows 0.00s of 100s used - Worker cold start — server log shows the worker spawned at 14:03:18 and has not respawned since - Disk quota — 43% used - SQLite lock — the 5s default timeout would raise database is locked, but these requests succeed after 50s

This looks like fsync latency on the write path to file storage. It matches the reports in the "Error 504 - LoadBalancer" forum thread and the storage server issues from earlier this month. The dashboard itself is also slow for me right now.

@queenrn your data is stored on a file server that have experienced issues recently, it should be more stable now but we're still investigating the issue.