F43nd1r / Acrarium

A Backend for ACRA written in Kotlin using Spring Boot, Vaadin and MySQL
Apache License 2.0
196 stars 51 forks source link

Unable to upload large Proguard mapping files #464

Closed AChep closed 10 months ago

AChep commented 10 months ago

The error is

org.springframework.dao.TransientDataAccessResourceException: jOOQ; SQL [insert into `version` (`app_id`, `code`, `flavor`, `name`, `mappings`) values (?, ?, ?, ?, ?) on duplicate key update `version`.`name` = ?, `version`.`mappings` = ?]; Packet for query is too large (175,025,917 > 4,194,304). You can change this value on the server by setting the 'max_allowed_packet' variable.

my mapping.txt file is 90mb large.

F43nd1r commented 10 months ago

Currently the default upload limit is set to 100mb. Are you using an old version?

AChep commented 10 months ago

@F43nd1r I'm using version 2.0.0-beta06 from f43nd1r/acrarium:next docker image.

AChep commented 10 months ago

Here's a docker config I'm using:

version: "3.7"

services:
   acrarium_db:
       image: mysql:5.7
       container_name: acrarium-db
       environment:
           MYSQL_ROOT_HOST: '%'
           MYSQL_ROOT_PASSWORD: "***"
           MYSQL_DATABASE: "acrarium"
           MYSQL_USER: "acrarium"
           MYSQL_PASSWORD: "***"
       restart: unless-stopped
       networks:
           - default
       volumes:
           - acrarium_data:/var/lib/mysql
       ulimits:
           nproc: 65535
           nofile:
               soft: 20000
               hard: 40000
       command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
   acrarium:
       image: f43nd1r/acrarium:next
       container_name: acrarium
       depends_on:
           - acrarium_db
       restart: unless-stopped
       networks:
           - traefik_default
           - default
       environment:
           SPRING_DATASOURCE_URL: jdbc:mysql://acrarium-db:3306/acrarium?useSSL=false&allowPublicKeyRetrieval=true&useLegacyDatetimeCode=false&serverTimezone=UTC
           SPRING_DATASOURCE_USERNAME: "acrarium"
           SPRING_DATASOURCE_PASSWORD: "***"
           SPRING_JPA_DATABASEPLATFORM: org.hibernate.dialect.MySQL57Dialect
potatoru commented 10 months ago

I have the same issue uploading 20mb proguard mapping file. No docker installation, just the jar file

F43nd1r commented 10 months ago

This is a problem of your database configuration. Set max_allowed_packet to a high enough value.

AChep commented 10 months ago

@F43nd1r consider adding command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--max_allowed_packet=200000000'] or something like that to the Wiki's Docker section. Changing max allowed packet fixed the issue.

F43nd1r commented 10 months ago

@AChep the wiki is freely editable, feel free to improve it

sirekanian commented 10 months ago

I've updated a wiki page, 128M works fine for me:

command: [..., '--max_allowed_packet=128M']