Slow Performance Issue with Django Admin in Production Environment

Hello, I need help because the Django admin is very slow when accessing an app. With the same database of less than 8000 records, it takes 8.60 seconds on the server and only 90 ms locally. I tried adding workers on the server, but it doesn't improve. I also tested it from very close to the server (from Miami), so I don't think it's latency. I have the Pro plan.
25 Replies
Percy
Percy4mo ago
Project ID: 60937526-0f38-463c-a9c3-319f6b9e53dd
Franco Leyes
Franco Leyes4mo ago
60937526-0f38-463c-a9c3-319f6b9e53dd
Brody
Brody4mo ago
where is your database hosted?
Franco Leyes
Franco Leyes4mo ago
I have tested from US West (Oregon, USA) and also from US East (Virginia, USA).
Brody
Brody4mo ago
okay so the database is on railway?
Franco Leyes
Franco Leyes4mo ago
Yes, it is in railway
Brody
Brody4mo ago
is your database and django app both in us east?
Franco Leyes
Franco Leyes4mo ago
Yes, both the database and Django app are hosted in the US East
Brody
Brody4mo ago
is your django app connecting to the database via the private network?
Franco Leyes
Franco Leyes4mo ago
Yes, the Django app is connecting to the database via the private network
Brody
Brody4mo ago
whats your middleware stack?
Franco Leyes
Franco Leyes4mo ago
My middleware stack configuration in the Django settings file is as follows: MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', "whitenoise.middleware.WhiteNoiseMiddleware", 'django.contrib.sessions.middleware.SessionMiddleware', "corsheaders.middleware.CorsMiddleware", 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.locale.LocaleMiddleware', 'auditlog.middleware.AuditlogMiddleware', ]
Brody
Brody4mo ago
looks fine, what is debug set to when on railway?
Franco Leyes
Franco Leyes4mo ago
DEBUG is set to False
Brody
Brody4mo ago
whats your start command when you run locally, and your start command that railway runs?
Want results from more Discord servers?
Add your server