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]: task scheduler does not run properly in a separate container on 0.19.4-beta.5 #4709

Closed
5 tasks done
mattbathje opened this issue May 7, 2024 · 1 comment
Closed
5 tasks done
Labels
bug Something isn't working

Comments

@mattbathje
Copy link

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Do you agree to follow the rules in our Code of Conduct?
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

A 0.19.4-beta.5 instance can not run the task scheduler as a separate container. When you attempt to do this, the task scheduler container keeps restarting, and tasks (such as updating Hot / Scaled / etc. sort types) never run.

If you move the task scheduler to run in the main lemmy container, the container does not restart and tasks run properly.

Steps to Reproduce

  1. Configure lemmy's docker-compose.yml to have a separate container for running tasks. In the tasks entrypoint, make sure the entrypoint is configured as: entrypoint: lemmy_server --disable-http-server --disable-activity-sending. On all other lemmy services in the docker-compose.yml, make sure the entrypoint contains --disable-scheduled-tasks
  2. (re) start your docker containers
  3. Watch the logs using docker compose logs -f lemmy-tasks - after a short period of time, the lemmy-tasks container will exit. If you use docker compose ps, you will see lemmy-tasks in a restarting state.

Technical Details

The following log is an example of the tasks container exiting, however the info/debug messages leading up to the exit are not always the same.

lemmy-tasks_1 | 2024-05-06T17:45:46.638489Z  INFO lemmy_server::scheduled_tasks: Updating active site and community aggregates ...
lemmy-tasks_1 | 2024-05-06T17:45:46.638589Z DEBUG tokio_postgres::query: executing statement s3 with parameters: [ToSqlHelper(PgTypeMetadata(Ok(InnerPgTypeMetadata { oid: 23, array_oid: 1007 })), Some([0, 0, 0, 1]))]
lemmy-docker_lemmy-tasks_1 exited with code 0

Version

0.19.4-beta.5

Lemmy Instance URL

No response

@mattbathje mattbathje added the bug Something isn't working label May 7, 2024
@mattbathje mattbathje changed the title [Bug]: task scheduler does not run properly in a separate container on 0,19.4-beta.5 [Bug]: task scheduler does not run properly in a separate container on 0.19.4-beta.5 May 7, 2024
@Nothing4You
Copy link
Collaborator

Nothing4You commented May 7, 2024

fix is in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants