pgAdmin 4 never finishes loading after you open it
pgAdmin 4 shows the loading spinner foreverShort answer
The desktop app starts a Python server and waits for it to answer. If that takes too long or the port is taken, the window just keeps loading. Open the log from File, View logs to see the real error, then raise the connection timeout or set a fixed port in the runtime settings.
Fix it fast
1Find out which cause you have
Read the log. It is the only place that says why the Python server did not come up.
# Linux / macOS tail -n 50 ~/.pgadmin/pgadmin4.log # Windows (Command Prompt) type %APPDATA%\pgAdmin\pgadmin4.log2Match what you see, then jump to its fix
- 1
The log shows no error, and the problem is worse on a slow or busy machineThe server needs longer to start than the runtime waitsFix - 2
Another program on the machine already uses the port that the log shows, or the problem comes and goes between startsThe random port clashes with another applicationFix
- 1
What does the error look like?
pgAdmin 4 shows the loading spinner foreverpgAdmin won't start (eternal loading)
Cause 1 of 2
The server needs longer to start than the runtime waits
1Check
The runtime waits for the server only as long as its ConnectionTimeout setting. A slow machine can exceed it. Open File, Configure runtime to see the value.
# macOS: ~/Library/Preferences/pgadmin ; Linux: ~/.local/share/pgadmin/ ; Windows: %APPDATA%/pgadmin (runtime_config.json)2Fix
In Configure runtime, raise ConnectionTimeout (seconds to wait for server startup), save, and restart pgAdmin.
# File > Configure runtime... > ConnectionTimeout3Verify
pgAdmin opens its browser tree after restart.
# Check the last lines of pgadmin4.log show the server startedConfirmed by pgadmin.org
Cause 2 of 2
The random port clashes with another application
1Check
By default the runtime picks a random port, which can collide with another program. A fixed port avoids the clash.
# Windows: netstat -ano | findstr :5050 | Linux/macOS: lsof -i :50502Fix
In Configure runtime, switch on FixedPort and set PortNumber to a free port, save, and restart.
# File > Configure runtime... > FixedPort = on, PortNumber = 50553Verify
pgAdmin starts, and the log shows the server on that port.
# Linux/macOS: lsof -i :5055Confirmed by pgadmin.org
How do I stop it coming back?
- Look at pgadmin4.log first whenever pgAdmin hangs; guessing wastes time.
- Set a fixed port if you run many local tools.
- Keep pgAdmin updated, as startup fixes ship in its release notes.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Databases
Installing the Airflow MySQL provider fails on pkg-config or mysqlclient
Building the mysqlclient wheel fails during the install
The Airflow MySQL provider depends on mysqlclient, which pip compiles against the MySQL C client library.
2 causes, each with a fixDatabases
Compiling a C or C++ program that includes mysql.h fails
undefined reference to `mysql_init'
The compiler only finds mysql.h when the MySQL client development files are installed and their folder is on the include path.
3 causes, each with a fixDatabases
DBeaver cannot run pg_restore: the utility is not found in the client home
Utility 'pg_restore' not found in client home '/usr/lib' (/usr/lib)
DBeaver runs pg_restore from a local PostgreSQL client folder; it does not bundle one.
3 causes, each with a fixDatabases
Django cannot connect to PostgreSQL: connection refused on port 5432, locally or in Docker
Is the server running on that host and accepting TCP/IP connections?
Connection refused means nothing accepted the connection at the host and port Django used.
4 causes, each with a fixDatabases
manage.py test stops with 'permission denied to create database' on PostgreSQL
django.db.utils.ProgrammingError: permission denied to create database
Django creates a separate database called test_ plus your database name, using the DATABASES USER.
2 causes, each with a fixDatabases
An EC2 instance cannot reach its RDS database
Could not open connection to the host, on port <port>: Connect failed
RDS denies all access until a security group allows it.
3 causes, each with a fix