Mysql warnings on server

Browsing through my syslog on the nextcloud server (apache/mariadb), I found some occurences of

“mysqld: InnoDB: Warning: a long semaphore wait:” together with some more lines of error/debug messages from mysql.

Does anyone else find these stuff on their server? I am not sure if this is a nextcloud problem or has to do something with mariadb itself. Using google, I found some people mention it might help to disable innodb_adaptive_hash_index, which I might try.

If you think it has to do with nextcloud, I am going to fill out the issue template to discuss it further :wink:

+1, count me in.
I installed 14 february Nextcloud besides my ‘old’ owncloud (on a Debian VPS). Now I have a strange behaviour for around 2 weeks. Sometimes high load, hanging Apache processes. Very strange because no high CPU/Wait, but I think high disk IO. And also a lot of MySQL messages.
syslog.7.gz:Feb 14 13:30:42 h2648104 mysqld: InnoDB: Warning: a long semaphore wait:
syslog.7.gz:Feb 14 13:31:13 h2648104 mysqld: InnoDB: Warning: a long semaphore wait:
syslog.7.gz:Feb 14 13:31:13 h2648104 mysqld: InnoDB: Warning: a long semaphore wait:
syslog.7.gz:Feb 14 13:31:44 h2648104 mysqld: InnoDB: Warning: a long semaphore wait:

At this moment I see the Nextcloud as the cause of the strange behavior on my box. I already disabled brute_force module and already added innodb_adaptive_hash_index=0 to my /etc/mysql/mariadb.conf.d/50-server.cnf . But It does not seems to help.

In my worst case scenario I have to do a rollback to the ownCloud install.

Regards, Jan

Hi,

I don’t see these messages in my log.
Searching the Internet I found a few bug reports. Some were very old. What I noticed there was, that most bug reports mentioned a charset of utf8 and/ or collate utf8_unicode_ci.

Maybe these configurations are related to this issue.

So just asking, did you follow this guide?
https://docs.nextcloud.com/server/12/admin_manual/configuration_database/mysql_4byte_support.html

You could also re-check your configuration in case your current settings are not quite optimal:
https://docs.nextcloud.com/server/12/admin_manual/configuration_database/linux_database_configuration.html

Before making any changes, please make sure to create a backup of your database. Just in case something goes wrong.

Thank you for your answer.

I did not follow the guide for the 4byte support, but I did not try to use emojis or something similar :wink:

Re-checking the configuration:

I do not find any of the mentioned configuration file. What I do find are three different files with the “extension=pdo_mysql.so”, these files are:
/etc/php/7.0/apache2/conf.d/20-pdo_mysql.ini
/etc/php/7.0/mods-available/pdo_mysql.ini
/etc/php/7.0/cli/conf.d/20-pdo_mysql.ini

None of these files contain any more settings. Do I have to set them somewhere or did I something wrong?

My initial setup of the database and the settings in config.php are like mentioned in the manual.

Hi,

Thanks for the quick answer. I did not follow the guides. Now I do have added the [mysqld] settings. The charset is utf8_bin (utf8mb4_general_ci) so that seems ok. I also added the mysql settings in /etc/php/7.0/apache2/conf.d/20-pdo_mysql.ini

At this moment my last “mysqld: InnoDB: Warning: a long semaphore wait:” is from 21 februari 15:40… so now keep fingers crossed :slight_smile:
Regards, Jan

Hi @all,

I also changed the mysql settings in /etc/php/7.0/apache2/conf.d/20-pdo_mysql.ini a few days ago and today, the issue occured again :frowning:

Just updated from mariadb to 10.0.34 from 10.0.33, let’s see if it changes anything…

Yesterday loging in to nextcloud and updated all my apps that need updating restarted my server, and now when I login to nextcloud. I get a error message bool(false). I look it up and It may have somthing to do with MYSQL. I look in the syslog an got this:

Mar 7 00:09:02 ubuntuserver1 systemd[1]: Starting Clean php session files…
Mr 7 00:09:03 ubuntuserver1 sessionclean[4125]: PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/mysqlnd.so’ - /usr/lib/php/20160303/mysqlnd.so: cannot open shared object file: No such file or directory in Unknown on line 0
Mr 7 00:09:02 ubuntuserver1 systemd[1]: Starting Clean php session files…
Mr 7 00:09:03 ubuntuserver1 sessionclean[4125]: PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/mysqlnd.so’ - /usr/lib/php/20160303/mysqlnd.so: cannot open shared object file: No such file or directory in Unknown on line 0
Mar 7 00:09:03 ubuntuserver1 sessionclean[4125]: PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/curl.so’ - /usr/lib/php/20160303/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
Mar 7 00:09:03 ubuntuserver1 sessionclean[4125]: PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/mysqli.so’ - /usr/lib/php/20160303/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
Mar 7 00:09:03 ubuntuserver1 sessionclean[4125]: PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/pdo_mysql.so’ - /usr/lib/php/20160303/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
@ ar 7 00:09:03 ubuntuserver1 sessionclean[4125]: PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/mysqlnd.so’ - /usr/lib/php/20160303/mysqlnd.so: cannot open shared object file: No such file or directory in Unknown on line 0
ar 7 00:09:03 ubuntuserver1 sessionclean[4125]: PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/curl.so’ - /usr/lib/php/20160303/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0

if you need more data let me know. I tried to open mysql logs and could not. Has any one seen this before.

Still no changes in the mysql behavior. Every few days, these strange warnings appear in the log and the nextcloud instance is not available for a few minutes. Has anyone some more information or should I file a bug report?