-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MYSQL #10440
Comments
GitMate.io thinks possibly related issues are #6745 (MySQL Database rights), #8863 (MySQL server has gone away during upgrade), #3349 (oc_calendarchanges in MySQL is very big), #5912 (Recommend PostgreSQL instead of MariaDB/MySQL), and #4914 (occ db:convert-type mysql -> UniqueConstraintViolationException). |
I just tried and it works just fine here. But maybe my setup is different. Could you enable the slow query log on your server to see mysql warning of uninexed queries that might be running? |
After several days of investigating and monitoring mysql i came up with a working result. No more filelocks and freezing while uploading files. But i am sure the code for accesing the DB could be optimized a lot. And maybe more relevant indexes. I had to go away from using REDIS and are now using Memcached and APCu Config.php attached MY.CNF [client] [mysqld_safe] [mysqld] user = mysql max_connections = 200 myisam_recover_options = BACKUP table_open_cache = 8000 query_cache_type = 1 log_warnings = 2 default_storage_engine = InnoDB innodb_buffer_pool_size = 256M innodb_fast_shutdown = 0 innodb_flush_log_at_trx_commit=1 [mysqldump] [mysql] [mariadb] [isamchk] !includedir /etc/mysql/conf.d/ CONFIG.PHP 'XXXXXXXXXXXXXXXXXXXXXXXXX', 'secret' => 'XXXXXXXXXXXXXXXXXXXXXXX', 'trusted_domains' => array ( 0 => 'localhost', 1 => '192.168.0.104', 2 => 'Changed For security reasons ', 3 => 'Changed For security reasonsk', 4 => 'Changed For security reasons', ), 'datadirectory' => '/mnt/data', 'overwrite.cli.url' => 'https://Changed For security reasons/', 'dbtype' => 'mysql', 'version' => '13.0.5.2', 'dbname' => 'nextcloud_db', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'oc_ncadmin', 'dbpassword' => 'XXXXXXXXXXXXXXXX, 'installed' => true, 'instanceid' => 'XXXXXXXXXXXXXX', 'maintenance' => false, 'mail_smtpmode' => 'smtp', 'memcache.locking' => '\\OC\\Memcache\\Memcached', 'memcache.local' => '\\OC\\Memcache\\APCu', 'filelocking.enabled' => true, 'filesystem_check_changes' => 0, 'redis' => array ( 'host' => '/var/run/redis/redis.sock', 'port' => 0, 'timeout' => 0.0, 'dbindex' => 0, 'password' => 'XXXXXXXXXXXXXXXXXXXXXXX', ), 'filelocking.ttl' => 5*5, 'htaccess.RewriteBase' => '/', 'loglevel' => 2, 'log_type' => 'file', 'logfile' => '/var/ncdata/nextcloud.log', 'logtimezone' => 'Europe/Copenhagen', 'mail_smtpsecure' => 'tls', 'mail_smtpauthtype' => 'LOGIN', 'mail_from_address' => 'nextcloud1', 'mail_domain' => 'XXXXXXXXXXX', 'mail_smtpauth' => 1, 'mail_smtphost' => 'smtp.gmail.com', 'mail_smtpport' => '587', 'mail_smtpname' => 'XXXXXXXXXX', 'mail_smtppassword' => 'XXXXXXXXXX', 'mail_smtptimeout' => 30, 'app.mail.imap.timeout' => 20, 'app.mail.smtp.timeout' => 2, 'app.mail.imaplog.enabled' => true, 'app.mail.smtplog.enabled' => true, 'updater.release.channel' => 'stable', 'enable_previews' => true, 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\PNG', 1 => 'OC\\Preview\\JPEG', 2 => 'OC\\Preview\\GIF', 3 => 'OC\\Preview\\BMP', 4 => 'OC\\Preview\\XBitmap', 5 => 'OC\\Preview\\Movie', 6 => 'OC\\Preview\\PDF', 7 => 'OC\\Preview\\MP3', 8 => 'OC\\Preview\\TXT', 9 => 'OC\\Preview\\MarkDown', ), 'preview_max_x' => 1024, 'preview_max_y' => 768, 'preview_max_scale_factor' => 1, 'theme' => '', 'data-fingerprint' => '4a07029789ca0c347cd21d1bcaacf91d', ); |
In addition, I've tried via the web interface to upload a library of> 1000 files and 1000 libraries. a total of about 200 Mb. Unfortunately, the process stops at a random time. The same exercise via a webdav app goes well. Therefore, I can conclude that I have only been optimized up to a certain point (amount of files/(directories). Maybe there is a BUG somewhere else |
Hi I'm almost 100% sure that I've found the cause of the problem. It's a bug in nextcloud 13.0.5. by creating five different libraries and for example copying 10 of the same files to each library. Then they are uploaded to nextcloud via the web interface. Upload stops almost instantly. Doing the same with unike files causes no problems. Therefore, I can conclude that nothing has to do with REDIS or incorrect configuration of mysql. with best regards |
same bug as "Upload via web interface of file with same name in different subfolders" #10527 Please close this one |
Steps to reproduce
Expected behaviour
All files and folder should be uploaded
Actual behaviour
Uploads stops after some time. When using REDIS locked files is one of the problems
Using Memcache instead is a lot better but problem stil exist
I think it has something to with the way nextcloud is handling MYSQL
The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.
The number of requests to read a row based on a fixed position. This is high if you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan whole tables or you have joins that don't use keys properly.
The number of logical reads that InnoDB could not satisfy from buffer pool and had to do a single-page read.
The number of times a row lock had to be waited for is high
The number of tables that have been opened. If opened tables is big,
The number of joins that do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.
Server configuration detail
Operating system: Linux 4.4.0-89-generic #112-Ubuntu SMP Mon Jul 31 19:38:41 UTC 2017 x86_64
Webserver: Apache/2.4.18 (Ubuntu) (apache2handler)
Database: mysql 10.2.16
PHP version: 7.0.30-0ubuntu0.16.04.1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, redis, apcu, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imap, intl, json, ldap, exif, mcrypt, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, shmop, SimpleXML, smbclient, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache
Nextcloud version: 13.0.5 - 13.0.5.2
**Updated from an older Nextcloud/ownCloud or fresh install:
Updated from 13.0.4
**Where did you install Nextcloud from:
Tech and me VM
Signing status
Array
List of activated apps
Configuration (config/config.php)
Are you using external storage, if yes which one: local/smb/sftp/...
NFS v3
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Client configuration
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Operating system:
Logs
Browser log
Nextcloud log
Browser log
Insert your browser log here, this could for example include:
The text was updated successfully, but these errors were encountered: