Skip to main content

Error analysis of could not accessing data

· 3 min read

Today, there was a server error happened on the server, and the users could not access their data.

We fixed the error, and this is the error analysis.

Error on webpage

This was HTTP 500 error happened on the server.

Some error happened on the server, please try it again or contact us via support@metaessen.com

Relevant time

Occurred time of the error: 2025-01-11 06:52:22 (UTC)

Fund time by us: About 2025-01-11 12:35:00 (UTC)

Fixed time of the error: 2025-01-11 12:41:47 (UTC)

Error analysis

Direct reason of the HTTP 500 error

Could not access the database:

2026-01-11 10:58:52,893	django.request	ERROR:	Internal Server Error: /account/login/
Traceback (most recent call last):

...

django.db.utils.OperationalError: terminating connection due to administrator command

Direct reason of the django.db.utils.OperationalError error

The database received the administrator command to terminate connection.

Postgresql log:

2026-01-11 14:52:23.206 CST [3140503] LOG:  received fast shutdown request
2026-01-11 14:52:23.206 CST [3140503] LOG: aborting any active transactions
2026-01-11 14:52:23.207 CST [1788006] FATAL: terminating connection due to administrator command

Direct reason of the terminating connection due to administrator command error

APT upgraded the system automatically.

log from /var/log/apt/history.log:

Start-Date: 2026-01-11  06:52:22
Commandline: /usr/bin/unattended-upgrade
Upgrade: postgresql-15:amd64 (15.14-0+deb12u1, 15.15-0+deb12u1), libpq-dev:amd64 (15.14-0+deb12u1, 15.15-0+deb12u1), postgresql-client-15:amd64 (15.14-0+deb12u1, 15.15-0+deb12u1), libpq5:amd64 (15.14-0+deb12u1, 15.15-0+deb12u1)
End-Date: 2026-01-11 06:52:27

Final reason

I created the server using default configuration provided by a cloud service provider, and the server had the service which updates or upgrades the server automatically.

Solution to fix the error

Restart the app on the server

Solution to avoid the similar errors

Temporary solution:

  1. Disable automatic update or upgrade of apt

Final solution:

  1. Create new Linux server using my own OS iso file
  2. Create new app on new Linux server
  3. Migrate the data to the new app
  4. Manual update or upgrade, or better solution for automatic update/upgrade server

Lessons from the event:

  1. Do not trust cloud service provider and their default created servers.
  2. Always use your own OS iso file to create new server.
  3. Consolidate your server.