Skip to content

felix-appsmith/Issue-MySql-Appsmith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Self-hosted MariaDB Too many connections

"Plugin failed to connect to data source with error: io.r2dbc.spi.R2dbcNonTransientResourceException: [1040] Too many connections"

With this our instance is not working, and all queries fails. Before there has been no connection issue whatsoever.


Steps to follow to reproduce the issues.

  1. Start the appsmith self-host.
  2. Start a docker-compose with MySQL.
version: '3.3'
services:
  db:
    image: mysql:5.7
    command:
        --max_connections=2
    restart: always
    environment:
      MYSQL_DATABASE: 'db'
      MYSQL_USER: 'user'
      MYSQL_PASSWORD: 'password'
      MYSQL_ROOT_PASSWORD: 'password'
    ports:
      - '3306:3306'
    expose:
      - '3306'
    volumes:
      - my-db:/var/lib/mysql
volumes:
  my-db:
  1. Up the docker container: sudo docker-compose up

Note: To make the connections,use ngrok.

  1. install ngrok

  2. Run this command: ngrok tcp 3306

  3. Example how to get Ngrok host and port to make connections.

appsmith@ngrok:~$ ngrok tcp 3306
Session Status   
online                                                                                   
Account                       Appsmith-svg (Plan: Free)                                                                  
Version                       3.1.0                                                                                     
Region                        Europe (eu)                                                                               
Latency                       164ms                                                                                    
Web Interface                 http://127.0.0.1:4040                                                                     
Forwarding                    tcp://0.tcp.eu.ngrok.io:16696 -> localhost:3306 
Connections                  
ttl     opn     rt1     rt5     p50     p90                                                                            
0       0       0.00    0.00    0.00    0.00                                                                                 
  • For example, the host and the port to make that connection would be.

host: 0.tcp.eu.ngrok.io port: 16696

  1. Connect to the database with DBeaver and Execute a query.
  2. Follow our guide to create a MySQL Datasource.

Note: disable ssl in appsmith.

  1. Connect to appsmith and run a mysql query and see the error.
Credentials
Database Name: mysql
Username: root
password: password

Back-end logs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published