← Back to team overview

libravatar-fans team mailing list archive

Re: libravatar server port - some troubles

 

On Sat, 13 Mar 2021 at 21:02, clime <clime7@xxxxxxxxx> wrote:
>
> Hey,
>
> during my testing, everything looked fine but as soon as I made a
> switch, I started to get 500 errors. Probably some problems with wsgi
> configuration. Might be related to psycopg2 module.
>
> I switched back to the old IP and will try to fix the problem. I will
> keep libravatar.org in maintenance mode for now and will try to find
> the problem.

I have resumed normal operation on the old server. Sadly, I haven't
figured it out so far. The error seems to occur only non-deterministically
and probably is load-dependant (given that I started to get it heavily
after switch).

There are two relevant error messages:

[Sat Mar 13 22:01:57.242462 2021] [wsgi:error] [pid 8270:tid 8418]
[remote 106.11.156.69:18651]   File
"/usr/lib64/python3.9/importlib/__init__.py", line 127, in
import_module
[Sat Mar 13 22:01:57.242467 2021] [wsgi:error] [pid 8270:tid 8418]
[remote 106.11.156.69:18651]     return
_bootstrap._gcd_import(name[level:], package, level)
[Sat Mar 13 22:01:57.242475 2021] [wsgi:error] [pid 8270:tid 8418]
[remote 106.11.156.69:18651]   File
"/data/venvs/libravatar/lib/python3.9/site-packages/django/db/backends/postgresql/base.py",
line 25, in <mo
dule>
[Sat Mar 13 22:01:57.242481 2021] [wsgi:error] [pid 8270:tid 8418]
[remote 106.11.156.69:18651]     import psycopg2 as Database
[Sat Mar 13 22:01:57.242488 2021] [wsgi:error] [pid 8270:tid 8418]
[remote 106.11.156.69:18651]   File
"/data/venvs/libravatar/lib64/python3.9/site-packages/psycopg2/__init__.py",
line 51, in <module>
[Sat Mar 13 22:01:57.242494 2021] [wsgi:error] [pid 8270:tid 8418]
[remote 106.11.156.69:18651]     from psycopg2._psycopg import (
              # noqa
[Sat Mar 13 22:01:57.242509 2021] [wsgi:error] [pid 8270:tid 8418]
[remote 106.11.156.69:18651] SystemError: initialization of _psycopg
raised unreported exception

And then repeating:
[Sat Mar 13 21:41:33.310712 2021] [wsgi:error] [pid 7411:tid 7563]
[remote 45.91.21.5:18613] Traceback (most recent call last):
[Sat Mar 13 21:41:33.310739 2021] [wsgi:error] [pid 7411:tid 7563]
[remote 45.91.21.5:18613]   File "/data/wsgi.py", line 26, in <module>
[Sat Mar 13 21:41:33.310748 2021] [wsgi:error] [pid 7411:tid 7563]
[remote 45.91.21.5:18613]     application = get_wsgi_application()
[Sat Mar 13 21:41:33.310755 2021] [wsgi:error] [pid 7411:tid 7563]
[remote 45.91.21.5:18613]   File
"/data/venvs/libravatar/lib/python3.9/site-packages/django/core/wsgi.py",
line 12, in get_wsgi_application
[Sat Mar 13 21:41:33.310759 2021] [wsgi:error] [pid 7411:tid 7563]
[remote 45.91.21.5:18613]     django.setup(set_prefix=False)
[Sat Mar 13 21:41:33.310767 2021] [wsgi:error] [pid 7411:tid 7563]
[remote 45.91.21.5:18613]   File
"/data/venvs/libravatar/lib/python3.9/site-packages/django/__init__.py",
line 24, in setup
[Sat Mar 13 21:41:33.310772 2021] [wsgi:error] [pid 7411:tid 7563]
[remote 45.91.21.5:18613]     apps.populate(settings.INSTALLED_APPS)
[Sat Mar 13 21:41:33.310779 2021] [wsgi:error] [pid 7411:tid 7563]
[remote 45.91.21.5:18613]   File
"/data/venvs/libravatar/lib/python3.9/site-packages/django/apps/registry.py",
line 83, in populate
[Sat Mar 13 21:41:33.310784 2021] [wsgi:error] [pid 7411:tid 7563]
[remote 45.91.21.5:18613]     raise RuntimeError("populate() isn't
reentrant")

Right now, I cannot reproduce the errors at all. I will continue the
investigation in the following days.
clime

> clime


Follow ups

References