miniflux / v2

Minimalist and opinionated feed reader
https://miniflux.app
Apache License 2.0
6.8k stars 716 forks source link

POLLING_FREQUENCY environment variable has no effect #2287

Open x0tester0x opened 9 months ago

x0tester0x commented 9 months ago

Every feed refreshes on the default interval of 60 minutes, but I configured with the environment variables an interval of 30 minutes: _www.youtube.com Last check: 46 minutes ago Next check: 13m29s_

I am running miniflux in a docker container with this configuration:

ADMIN_PASSWORD=<secret>
ADMIN_USERNAME=admin
AUTH_PROXY_HEADER=
AUTH_PROXY_USER_CREATION=false
BASE_PATH=
BASE_URL=http://localhost
BATCH_SIZE=100
CERT_DOMAIN=
CERT_FILE=
CLEANUP_ARCHIVE_BATCH_SIZE=10000
CLEANUP_ARCHIVE_READ_DAYS=100
CLEANUP_ARCHIVE_UNREAD_DAYS=300
CLEANUP_FREQUENCY_HOURS=24
CLEANUP_REMOVE_SESSIONS_DAYS=10
CREATE_ADMIN=true
DATABASE_CONNECTION_LIFETIME=10
DATABASE_MAX_CONNS=30
DATABASE_MIN_CONNS=10
DATABASE_URL=<secret>
DISABLE_HSTS=false
DISABLE_HTTP_SERVICE=false
DISABLE_SCHEDULER_SERVICE=false
FETCH_ODYSEE_WATCH_TIME=false
FETCH_YOUTUBE_WATCH_TIME=true
HTTPS=true
HTTP_CLIENT_MAX_BODY_SIZE=31457280
HTTP_CLIENT_PROXY=
HTTP_CLIENT_TIMEOUT=30
HTTP_CLIENT_USER_AGENT=...
HTTP_SERVER_TIMEOUT=300
HTTP_SERVICE=true
INVIDIOUS_INSTANCE=yewtu.be
KEY_FILE=
LISTEN_ADDR=0.0.0.0:8080
LOG_DATE_TIME=false
LOG_FILE=stderr
LOG_FORMAT=text
LOG_LEVEL=info
MAINTENANCE_MESSAGE=Miniflux is currently under maintenance
MAINTENANCE_MODE=false
METRICS_ALLOWED_NETWORKS=127.0.0.1/8
METRICS_COLLECTOR=false
METRICS_PASSWORD=
METRICS_REFRESH_INTERVAL=30
METRICS_USERNAME=
OAUTH2_CLIENT_ID=
OAUTH2_CLIENT_SECRET=
OAUTH2_OIDC_DISCOVERY_ENDPOINT=
OAUTH2_PROVIDER=
OAUTH2_REDIRECT_URL=
OAUTH2_USER_CREATION=false
POCKET_CONSUMER_KEY=
POLLING_FREQUENCY=30
POLLING_PARSING_ERROR_LIMIT=10
POLLING_SCHEDULER=round_robin
PROXY_HTTP_CLIENT_TIMEOUT=100
PROXY_MEDIA_TYPES=[image audio video]
PROXY_OPTION=http-only
PROXY_PRIVATE_KEY=<secret>
PROXY_URL=
ROOT_URL=http://localhost
RUN_MIGRATIONS=true
SCHEDULER_ENTRY_FREQUENCY_FACTOR=1
SCHEDULER_ENTRY_FREQUENCY_MAX_INTERVAL=1440
SCHEDULER_ENTRY_FREQUENCY_MIN_INTERVAL=10
SCHEDULER_ROUND_ROBIN_MIN_INTERVAL=60
SCHEDULER_SERVICE=true
SERVER_TIMING_HEADER=false
WATCHDOG=true
WEBAUTHN=false
WORKER_POOL_SIZE=10
YOUTUBE_EMBED_URL_OVERRIDE=https://www.youtube-nocookie.com/embed/
tabell commented 9 months ago

I am having the same issue. I am using docker compose with POLLING_FREQUENCY=1 in the environment block, and I can see that the env var has indeed been injected to the miniflux process by starting an interactive shell in the container and viewing /proc/1/environ, however all my feeds are still updating on the 60 minute interval

mlyxshi commented 8 months ago

same here

clajiness commented 8 months ago

Same issue. My polling frequency has been successfully set at 20 minutes for years. It's now not honoring that value and polling at 60 minutes.

EDIT: I ended up setting POLLING_FREQUENCY=20 and SCHEDULER_ROUND_ROBIN_MIN_INTERVAL=15 just to see where I'd end up, and now it's checking for updates every 15 minutes. I'll continue to tinker, but I don't really understand how this works yet.

EDIT 2: I guess it is what it is. Set your SCHEDULER_ROUND_ROBIN_MIN_INTERVAL to something lower than your POLLING_FREQUENCY and you'll be fine.

jerryc127 commented 6 months ago

same here

fin444 commented 6 months ago

From my investigations it seems that the cause is this: Every POLLING_FREQUENCY, it will check the next BATCH_SIZE feeds. However, in the default round robin mode, it will only check each feed a minimum of SCHEDULER_ROUND_ROBIN_MIN_INTERVAL. This allows you to do something like

POLLING_FREQUENCY = 1;
SCHEDULER_ROUND_ROBIN_MIN_INTERVAL = 20;
BATCH_SIZE = 5;

which will check a total of 100 unique feeds every 20 minutes (works great if you have less than 100 feeds). However, it will only check 5 feeds per minute to prevent a lag spike. The downside of this is that by default, POLLING_FREQUENCY does not work as expected.

Since this seems to be an intended feature, "fixing" it may require a change to the documentation rather than the actual behavior.