ExportXMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • None
    • Component/s: None

      In some cases, such as an outage of the whole infrastructure, uWSGI can fail to restart a service, failing with the error "another instance of uWSGI is running on the same address" and restarting in a loop every 30 seconds.

      Restarting the container solves the problem.
      The last time I witnessed this was with the listenbrainz-labs-api-prod container.

       

      Not sure where the issue is coming from, but it looks like some connections remain open despite restarting the main loop when there is an issue.

      Actual logs:

      *** Starting uWSGI 2.0.26 (64bit) on [Fri Nov  8 13:51:43 2024] ***
      compiled with version: 11.4.0 on 13 August 2024 14:30:20
      os: Linux-5.15.0-94-generic #104~20.04.1-Ubuntu SMP Tue Jan 16 13:34:09 UTC 2024
      nodename: kiss
      machine: x86_64
      clock source: unix
      detected number of CPU cores: 24
      current working directory: /code/listenbrainz
      detected binary path: /usr/local/bin/uwsgi
      !!! no internal routing support, rebuild with pcre support !!!
      setgid() to 33
      setuid() to 33
      chdir() to /code/listenbrainz
      your memory page size is 4096 bytes
      detected max file descriptor number: 1048576
      lock engine: pthread robust mutexes
      thunder lock: disabled (you can enable it with --thunder-lock)
      probably another instance of uWSGI is running on the same address (0.0.0.0:3031).
      bind(): Address already in use [core/socket.c line 769]
      2024-11-08T13:51:43.666Z [ERR] (cli) child process exited with code 1
      Nov  8 13:51:43 kiss consul-template[137444]: (cli) child process exited with code 1
      2024-11-08 13:51:43 UTC labs-api terminated. Exit status 1
      85ce4fac-c268-4cef-bef8-b9f1d938b911
      2024-11-08 13:51:44 UTC Exited with non-0 status, sleeping 10 seconds
      2024/11/08 13:51:55 [DEBUG] (logging) enabling syslog on LOCAL0
      2024-11-08 13:51:55 UTC run-lb-command starting uwsgi /etc/uwsgi/uwsgi-labs-api.ini
      [uWSGI] getting INI configuration from /etc/uwsgi/uwsgi-labs-api.ini
      

            Assignee:
            Unassigned
            Reporter:
            Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Version Package