Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Restarting pyLoad via the webinterface causes infinite loop #55

Closed
1 task done
Sab44 opened this issue Aug 22, 2024 · 3 comments
Closed
1 task done

[BUG] Restarting pyLoad via the webinterface causes infinite loop #55

Sab44 opened this issue Aug 22, 2024 · 3 comments

Comments

@Sab44
Copy link

Sab44 commented Aug 22, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When restarting pyLoad via the web interface on the "Settings" tab (clicking the "Restart pyLoad" button), the docker logs get spammed with

pyload-ng  | pyLoad already running with pid xxx
pyload-ng  | Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyload-ng  | pyLoad already running with pid xxx
pyload-ng  | Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyload-ng  | pyLoad already running with pid xxx
pyload-ng  | Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!

Note: not talking about the pyLoad log visible on the web UI in the Logs tab, but the logs inside the docker container as observed by Dockge.
There is also a slight but noticeable increase in CPU load observable.

It seems, there's some kind of watchdog that implicitly restarts pyLoad if it exits. If I click on the "Quit pyLoad" button, it is also restarted straight away (although without the log spam). So if I click "Restart pyLoad" it is presumably either

  • restarted by the watchdog, and the "internal" restart mechanism spams the log
  • restarted by the internal mechanism and the watchdog spams the log

Expected Behavior

Restarting pyLoad via the web interface should not cause this loop and spam in the logs.

Steps To Reproduce

  1. docker compose up with pyload-ng:latest
  2. restart pyLoad on Settings tab in web interface
  3. observe docker logs (e.g. in Dockge)

Environment

- OS: Debian 12
- How docker service was installed: according to official docker documentation

CPU architecture

x86-64

Docker creation

services:
  pyload-ng:
    image: lscr.io/linuxserver/pyload-ng:latest
    container_name: pyload-ng
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - /root/pyload:/config
      - /mnt/downloads:/downloads
    ports:
      - 8000:8000 # Webinterface
      - 9666:9666 # Click 'N' Load
    restart: unless-stopped
networks: {}

Container logs

[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
pyLoad: https://PayPal.Me/nitzo2001/0usd

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

cp: not replacing '/config/settings/pyload.cfg'
[custom-init] No custom files found, skipping...
[2024-08-22 12:02:42]  INFO                pyload  *** Welcome to pyLoad 0.5.0 ***
[2024-08-22 12:02:42]  WARNING             pyload  Download folder was specified from the commandline
[2024-08-22 12:02:42]  INFO                pyload  ADDON ExternalScripts: Activated scripts in folder `package_extracted`: webhook.sh
[2024-08-22 12:02:42]  INFO                pyload  Activated addons: ClickNLoad, ExternalScripts, ExtractArchive, UnSkipOnFail, UserAgentSwitcher
[2024-08-22 12:02:42]  INFO                pyload  Deactivate addons: AndroidPhoneNotify, AntiCaptcha, AntiStandby, AntiVirus, AppriseNotify, BypassCaptcha, Captcha9Kw, Checksum, CloudFlareDdos, DeathByCaptcha, DeleteFinished, DiscordNotifier, DownloadScheduler, ExpertDecoders, HotFolder, IRC, ImageTyperz, JustPremium, LinkFilter, LogMarker, MergeFiles, MultiHome, PushBullet, PushOver, RestartFailed, SkipRev, TORRENT, TransmissionRPC, UpdateManager, WindowsPhoneNotify, XFileSharing, XMPP
[2024-08-22 12:02:42]  INFO                pyload  User directory: /config
[2024-08-22 12:02:42]  INFO                pyload  Cache directory: /tmp/pyLoad
[2024-08-22 12:02:42]  INFO                pyload  Storage directory: /downloads
[2024-08-22 12:02:42]  INFO                pyload  Storage free space: 3.07 TiB
[2024-08-22 12:02:42]  INFO                pyload  Activating accounts...
[2024-08-22 12:02:42]  INFO                pyload  ACCOUNT DdownloadCom: Adding user `big*******`...
[2024-08-22 12:02:42]  INFO                pyload  ACCOUNT DdownloadCom: Login user `big****`...
[2024-08-22 12:02:42]  INFO                pyload  ACCOUNT DdownloadCom: Checking for link errors...
[2024-08-22 12:02:42]  INFO                pyload  ACCOUNT DdownloadCom: No errors found
[2024-08-22 12:02:42]  INFO                pyload  ACCOUNT DdownloadCom: Grabbing account info for user `big****`...
[2024-08-22 12:02:42]  INFO                pyload  Activating plugins...
[2024-08-22 12:02:42]  INFO          pyload.webui  Starting webserver: http://0.0.0.0:8000
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
[ls.io-init] done.
[2024-08-22 12:02:47]  INFO                pyload  ADDON ClickNLoad: Proxy listening on 0.0.0.0:9666
[2024-08-22 12:03:02]  INFO                pyload  pyLoad is restarting...
[2024-08-22 12:03:02]  INFO                pyload  ADDON ClickNLoad: Shutting down proxy...
[2024-08-22 12:03:02]  INFO                pyload  Exiting core...
[2024-08-22 12:03:03]  INFO                pyload  *** Welcome to pyLoad 0.5.0 ***
[2024-08-22 12:03:03]  WARNING             pyload  Download folder was specified from the commandline
pyLoad already running with pid 207
[2024-08-22 12:03:03]  INFO                pyload  ADDON ExternalScripts: Activated scripts in folder `package_extracted`: webhook.sh
[2024-08-22 12:03:03]  INFO                pyload  Activated addons: ClickNLoad, ExternalScripts, ExtractArchive, UnSkipOnFail, UserAgentSwitcher
[2024-08-22 12:03:03]  INFO                pyload  Deactivate addons: AndroidPhoneNotify, AntiCaptcha, AntiStandby, AntiVirus, AppriseNotify, BypassCaptcha, Captcha9Kw, Checksum, CloudFlareDdos, DeathByCaptcha, DeleteFinished, DiscordNotifier, DownloadScheduler, ExpertDecoders, HotFolder, IRC, ImageTyperz, JustPremium, LinkFilter, LogMarker, MergeFiles, MultiHome, PushBullet, PushOver, RestartFailed, SkipRev, TORRENT, TransmissionRPC, UpdateManager, WindowsPhoneNotify, XFileSharing, XMPP
[2024-08-22 12:03:03]  INFO                pyload  User directory: /config
[2024-08-22 12:03:03]  INFO                pyload  Cache directory: /tmp/pyLoad
[2024-08-22 12:03:03]  INFO                pyload  Storage directory: /downloads
[2024-08-22 12:03:03]  INFO                pyload  Storage free space: 3.07 TiB
[2024-08-22 12:03:03]  INFO                pyload  Activating accounts...
[2024-08-22 12:03:03]  INFO                pyload  ACCOUNT DdownloadCom: Adding user `big*******`...
[2024-08-22 12:03:03]  INFO                pyload  ACCOUNT DdownloadCom: Login user `big****`...
[2024-08-22 12:03:03]  INFO                pyload  ACCOUNT DdownloadCom: Checking for link errors...
[2024-08-22 12:03:03]  INFO                pyload  ACCOUNT DdownloadCom: No errors found
[2024-08-22 12:03:03]  INFO                pyload  ACCOUNT DdownloadCom: Grabbing account info for user `big****`...
[2024-08-22 12:03:03]  INFO                pyload  Activating plugins...
[2024-08-22 12:03:03]  INFO          pyload.webui  Starting webserver: http://0.0.0.0:8000
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyLoad already running with pid 207
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyLoad already running with pid 207
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyLoad already running with pid 207
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyLoad already running with pid 207
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyLoad already running with pid 207
[2024-08-22 12:03:08]  INFO                pyload  ADDON ClickNLoad: Proxy listening on 0.0.0.0:9666
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyLoad already running with pid 207
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyLoad already running with pid 207
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyLoad already running with pid 207
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
pyLoad already running with pid 207
Connection to localhost (127.0.0.1) 8000 port [tcp/*] succeeded!
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@aptalca
Copy link
Member

aptalca commented Aug 22, 2024

Our container uses s6 as the supervisor, which is what you're seeing restart the service when it stops.

We don't recommend using app commands to stop or restart processes inside the container because the app does not know how it is started and often leads to issues you're observing. And we have no control over how the app tries to restart itself.

To restart, you should restart the container.

@Sab44
Copy link
Author

Sab44 commented Aug 22, 2024

I see, thanks for the explanation.
It is unfortunate that it can lead to this behaviour, but I understand. Going to close the issue then.

@Sab44 Sab44 closed this as completed Aug 22, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants