a year ago
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.
0 Replies
a year ago
where is your database hosted?
I have tested from US West (Oregon, USA) and also from US East (Virginia, USA).
a year ago
okay so the database is on railway?
a year ago
is your database and django app both in us east?
a year ago
is your django app connecting to the database via the private network?
a year ago
whats your middleware stack?
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',
]
a year ago
looks fine, what is debug set to when on railway?
a year ago
whats your start command when you run locally, and your start command that railway runs?
a year ago
already using gevent, that was what i was going to ask you to try next
a year ago
at this moment no, but i do know that this would not be a platform issue
a year ago
there is some kind of misconfiguration somewhere
a year ago
you would need to implement some kind of highly verbose logging for that
a year ago
have you tried other worker classes?
yes, I've experimented with different worker classes, but the performance issue persists
a year ago
im stumped, that just leaves process of elimination, remove bits of code until the issue goes away, not the most elegant solution, but it can work
a year ago
please update me if you find anyting!