Instagram, and Pocket import not working with redis.
I haven't been able to successfully run import from Pocket or Instapaper with redis. A few remarks-
- I am using mariadb for database.
- Without redis, import works. However, the process times out after importing only a few hundred articles out of a total of a thousand plus articles. Running the same import again results in duplicate articles, rather than the next few hundred articles.
- Here's my docker-compose.yaml
version: '3'
services:
wallabag:
container_name: wallabag
image: wallabag/wallabag
restart: always
depends_on:
- db
- redis
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=3306
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
- SYMFONY__ENV__FOSUSER_REGISTRATION=false
- SYMFONY__ENV__DOMAIN_NAME=https://wallabag.example.com
ports:
- "41238:80"
volumes:
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
db:
image: mariadb
restart: always
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
volumes:
- /opt/wallabag/data:/var/lib/mysql
redis:
image: redis:alpine
- Wallabag acknowledges that it can find Redis because on the import page it says on the top
Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is: Redis. - I have run the following command:
docker exec -t NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER /var/www/wallabag/bin/console wallabag:install --env=prod --no-interaction - If I revisit the import page, it keeps saying "Messages in queue: [SAME_NUMBER_EVERY_TIME]"
I will be more than happy to provide any logs or any other information needed to debug this issue. Please note I am new to Wallabag and dockers in general.
You have to launch the worker once the import is made. Otherwise, the queue won't be handled.
docker exec -t NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER /var/www/wallabag/bin/console wallabag:import:redis-worker pocket --env=prod
Thanks @j0k3r that command did the trick. I would recommend adding that to the Readme document. The command which is already there is different and didn't work for me. My guess is- since I am using docker-compose to launch wallabag, the command already present in the Readme document tries to create another wallabag container and hence incompatible, where as the command you provided me executes within the running docker container. Is my assessment correct?
docker run --name wallabag --link wallabag-db:wallabag-db --link redis:redis -e <... your config variables here ...> wallabag/wallabag import <type>
Unfortunately, the import-worker crashed after import two hundred or so articles. Here's the relevant part from the log-
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/wallabag/src/Wallabag/CoreBundle/Helper/DownloadImages.php on line 125
[Symfony\Component\Debug\Exception\OutOfMemoryException]
Exception trace:
() at /var/www/wallabag/src/Wallabag/CoreBundle/Helper/DownloadImages.php:125
The headless server this is running on has 8GB of memory.
I've been trying to do the same (have a quite large collection in pocket), but I'm not sure if I'm doing everything right.
I have a postgresql database on a separate machine, and I've tried doing:
docker run -p 6379:6379 --name redis redis:alpine
docker run --name wallabag -e "POSTGRES_PASSWORD=redacted" -e "POSTGRES_USER=wallabag" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql" -e "SYMFONY__ENV__DATABASE_HOST=redacted" -e "SYMFONY__ENV__DATABASE_PORT=5432" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=redacted" -e "SYMFONY__ENV__DOMAIN_NAME=http://wallabag.redacted.domain -e VIRTUAL_HOST=wallabag.redacted.domain -e POPULATE_DATABASE=False --link redis:redis -p 80:80 wallabag/wallabag
Redis server does not seem to get any connection (yes, both redis and Wallabag container run on the same machine):
1:C 18 Jan 2021 18:00:40.543 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C 18 Jan 2021 18:00:40.543 # Redis version=6.0.10, bits=64, commit=00000000, modified=0, pid=1, just started 1:C 18 Jan 2021 18:00:40.543 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 1:M 18 Jan 2021 18:00:40.544 * Running mode=standalone, port=6379. 1:M 18 Jan 2021 18:00:40.544 # Server initialized 1:M 18 Jan 2021 18:00:40.544 * Ready to accept connections
in the end import fails at some point.