Code Monkey home page Code Monkey logo

Comments (8)

alanamarzoev avatar alanamarzoev commented on May 14, 2024 1

Hey @aarjan, could you try adding STANDALONE: “1" under environment and let me know if that fixes the problem?

from readyset.

jseldess avatar jseldess commented on May 14, 2024 1

Also, @aarjan, I'd suggest tweaking a few other env variables for readyset. For example, your RS_API_KEY variable is referencing the docker image. You don't really need that variable for testing. It's mostly to help readyset with telemetry. And you should probably set caching to "explicit" mode, which means you decide which queries to cache rather than having readyset cache every query it supports.

Here's what I would recommend for the readyset environment variables:

    environment:
      STANDALONE: "1"
      DEPLOYMENT: "quickstart_docker"
      DATABASE_TYPE: mysql
      UPSTREAM_DB_URL: "mysql://root:pn_pass@mysql:3307/neuroflip_copy"
      ALLOWED_USERNAME: root
      ALLOWED_PASSWORD: pn_pass
      LISTEN_ADDRESS: "0.0.0.0:5433"
      QUERY_CACHING: explicit
      DB_DIR: "/state"

Also, if you use readyset:latest instead of readyset:beta-2023-01-18, we've changed it so that the readyset user and password default to the username/password for the db in UPSTREAM_DB_URL, so if you just want to reuse those credentials for readyset (and it looks like you do), you can leave out ALLOWED_USERNAME and ALLOWED_PASSWORD.

All of these CLI options are now in our docs at https://docs.readyset.io/reference/cli/readyset/, in case that helps. We're also working on adding a docker compose file to the docs.

from readyset.

jseldess avatar jseldess commented on May 14, 2024 1

Will get those docs online asap, hopefully by the end of today.

from readyset.

alanamarzoev avatar alanamarzoev commented on May 14, 2024

Hey @elhardoum thanks for opening an issue!

Yes, assuming you're running ReadySet in explicit caching mode, you have to explicitly cache queries. You can see info on how to do this here: caching docs

If you're in implicit mode, ReadySet will cache all queries that are supported.

Could you check which mode you're using by doing (it's the query-caching flag)?

It would also be helpful to see the output of SHOW PROXIED QUERIES and SHOW CACHED QUERIES as well as the full error logs.

from readyset.

elhardoum avatar elhardoum commented on May 14, 2024

Sorry, this is not a bug, when I posted this I couldn't run those custom SQL commands on either MySQL shell (same for now). Not much luck with the documentation.

from readyset.

jbensal avatar jbensal commented on May 14, 2024

@elhardoum

Are there any other errors in the logs that you're seeing? If you see Snapshotting finished in the logs after running docker logs readyset | grep 'Snapshotting finished', that means ReadySet is up and running successfully. Another thing to try is bumping your MySQL version up to 8.0.

I'd like to help you get this working! I'm happy to help you troubleshoot this and see where we can improve the documentation.

from readyset.

aarjan avatar aarjan commented on May 14, 2024

@alanamarzoev I tried to run similar code as OP in docker swarm, it is not working. I am getting this error,

nknown-linux-gnu, rustc_version: rustc 1.64.0-nightly (fe3342816 2022-08-01), profile: release, opt_level: 3}
pn_readyset.1.yi44l6c5i734@ip-172-31-26-247    | 2023-02-10T08:38:51.891786Z ERROR authority:create:exec:execute:send: rustify::clients::reqwest: error=Error sending HTTP request
pn_readyset.1.yi44l6c5i734@ip-172-31-26-247    | 2023-02-10T08:38:51.891927Z ERROR authority:create:exec:execute: rustify::client: error=Error sending HTTP request
pn_readyset.1.yi44l6c5i734@ip-172-31-26-247    | 2023-02-10T08:38:51.891977Z ERROR authority:create:exec: rustify::endpoint: error=Error sending HTTP request
pn_readyset.1.yi44l6c5i734@ip-172-31-26-247    | 2023-02-10T08:38:51.892060Z ERROR authority:create: consulrs::session: error=An error occurred with the request
pn_readyset.1.yi44l6c5i734@ip-172-31-26-247    | 2023-02-10T08:38:51.892266Z ERROR readyset_server::startup: Controller failed context=LogContext({"deployment": "quickstart_docker"}) error=Internal invariant violated: controller's authority thread failed: Error issuing request An error occurred with the request

This is the docker config,

version: "3.3"
services:
  mysql:
    image: mysql:5.7
    ports:
      - "3307:3307"
    networks:
      - backend
    volumes:
      - ./data/sqldata:/var/lib/mysql
    command: mysqld --default-authentication-plugin=mysql_native_password
    environment:
       MYSQL_ROOT_PASSWORD: pn_pass
       MYSQL_DATABASE: pn
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
          - node.role == manager
    logging: &logging
      options:
        max-size: "10m"
        max-file: "3"

  readyset:
    image: public.ecr.aws/readyset/readyset:beta-2023-01-18
    ports:
      - 5433:5433
      - 3308:3308
    depends_on:
      - mysql
    networks:
      - backend
    volumes:
      - ./data/readyset:/state
    environment:
      DB_DIR: /state
      ALLOWED_USERNAME: root
      ALLOWED_PASSWORD: pn_pass
      DATABASE_TYPE: mysql
      DEPLOYMENT: quickstart_docker
      UPSTREAM_DB_URL: mysql://root:pn_pass@mysql:3307/neuroflip_copy
      RS_API_KEY: public.ecr.aws/readyset/readyset:beta-2023-01-18
      # LISTEN_ADDRESS: 0.0.0.0:5433
    logging:
      <<: *logging

networks:
  backend:
    driver: overlay
    ```

from readyset.

aarjan avatar aarjan commented on May 14, 2024

Thank you @alanamarzoev, it worked as a charm. I was try so many other combination but couldn't figure it out.

Thank you @jseldess for your suggestions. That docker-compose file was a major missing in the docs. I had to browse through every github issue to get answers.

from readyset.

Related Issues (20)

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.