Code Monkey home page Code Monkey logo

redis's People

Contributors

csandanov avatar pprishchepa avatar wodbot avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

redis's Issues

Cannot connect wordpress object cache to redis

I followed the instructions here: http://docs.docker4wordpress.org/en/latest/containers/redis/, but wordpress cannot connect to the redis instance. I've tried on a fresh ubuntu installation and docker for windows. I am a docker newbie, so there may be some obvious setup that is implied that I have missed.

here is the docker-compose.yml:

version: "2"

services:
  mariadb:
    image: wodby/mariadb:10.1-2.1.0
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
    volumes:
#      - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
      - ./mysql:/var/lib/mysql # I want to manage volumes manually.

  php:
#    image: wodby/wordpress:4-7.1-2.1.0
#    image: wodby/wordpress:4-7.0-2.1.0
#    image: wodby/wordpress-php:7.0-2.1.0
    image: wodby/wordpress-php:7.1-2.1.0
    environment:
      PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
      # PHP_XDEBUG: 1
      # PHP_XDEBUG_DEFAULT_ENABLE: 1
      # PHP_XDEBUG_REMOTE_CONNECT_BACK: 0         # This is needed to respect remote.host setting bellow
      # PHP_XDEBUG_REMOTE_HOST: "10.254.254.254"  # You will also need to 'sudo ifconfig lo0 alias 10.254.254.254'
    volumes:
      - ./wordpress:/var/www/html
#      - d4d-unison-sync:/var/www/html # Docker-sync for macOS users

  nginx:
    image: wodby/wordpress-nginx:4-1.10-2.1.0
    environment:
      NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
      NGINX_ERROR_LOG_LEVEL: debug
      NGINX_BACKEND_HOST: php
      NGINX_SERVER_ROOT: /var/www/html/
    volumes:
      - ./wordpress:/var/www/html
#      - d4d-unison-sync:/var/www/html # Docker-sync for macOS users
    depends_on:
      - php
    labels:
      - 'traefik.backend=nginx'
      - 'traefik.port=80'
      - 'traefik.frontend.rule=Host:wp.docker.localhost'

  varnish:
    image: wodby/wordpress-varnish:4.1-2.1.0
    depends_on:
      - nginx
    environment:
      VARNISH_SECRET: secret
      VARNISH_BACKEND_HOST: nginx
      VARNISH_BACKEND_PORT: 80
    labels:
      - 'traefik.backend=varnish'
      - 'traefik.port=6081'
      - 'traefik.frontend.rule=Host:varnish.wp.docker.localhost'

  redis:
    image: wodby/redis:3.2-2.1.0
    volumes:
      - ./redis:/data

  pma:
    image: phpmyadmin/phpmyadmin
    environment:
      PMA_HOST: mariadb
      PMA_USER: wordpress
      PMA_PASSWORD: wordpress
      PHP_UPLOAD_MAX_FILESIZE: 1G
      PHP_MAX_INPUT_VARS: 1G
    labels:
      - 'traefik.backend=pma'
      - 'traefik.port=80'
      - 'traefik.frontend.rule=Host:pma.wp.docker.localhost'

  mailhog:
    image: mailhog/mailhog
    labels:
      - 'traefik.backend=mailhog'
      - 'traefik.port=8025'
      - 'traefik.frontend.rule=Host:mailhog.wp.docker.localhost'

  traefik:
    image: traefik
    command: -c /dev/null --web --docker --logLevel=INFO
    ports:
      - '8000:80'
      - '8080:8080' # Dashboard
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

Config for drupal 8

I would like to install redis on my docker4drupal website,

but I can't get the configuration in documentation, I install the module redis for drupal, whas is the correct configuration ?

Thanks

Support for Apple Silicon / ARM processors

I'm running this container using Docksal, and it's not working because I'm using an M1 MacBook Pro, which has an ARM processor, and this container is AMD64.

The error it throws is:

runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc

And then a big stack trace, which I can paste in here if that would be helpful.

Redis saves to disk even when REDIS_SAVE_TO_DISK is not set

Problem

The default redis configuration conflicts with the expected behavior of REDIS_SAVE_TO_DISK.

Currently when this container is run without setting REDIS_SAVE_TO_DISK redis will still try to dump it's content to the disk, causing slowdowns because of the default configuration:

Unless specified otherwise, by default Redis will save the DB:

  • After 3600 seconds (an hour) if at least 1 change was performed
  • After 300 seconds (5 minutes) if at least 100 changes were performed
  • After 60 seconds if at least 10000 changes were performed

Source: https://raw.githubusercontent.com/redis/redis/7.0/redis.conf

User Story

As a user I want to run this redis container without dumping the db content to disk.

This should be archived using a command similar to the following:

docker run -d -p 6379 wodby/redis:7

Expected outcome

Redis does not dump the data to disk, because REDIS_SAVE_TO_DISK is not set.

Actual outcome

The data is dumped to disk based on the default save configuration.
image

Performance issues

I am running Redis in global mode for a swarm setup and have some performance issues.

I am looking at the logs and I have this going on as well, which may or not be related:

1:M 24 Apr 22:03:10.486 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.,
1:M 24 Apr 22:03:10.486 # Server started, Redis version 3.2.8,
1:M 24 Apr 22:03:10.486 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.,
1:M 24 Apr 22:03:10.486 * The server is now ready to accept connections on port 6379,
1:M 24 Apr 22:03:10.486 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

Any thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.