Gustavo
Gustavo

Reputation: 1

MariaDB - "Error writing file" on binary logs

I have several MariaDB 10.1.45 instances running in Linux containers with memory limits.

Last week I have enabled binary logging on all of them with the following parameters:

log-bin = mysqld-bin  
binlog-format = mixed  
expire_logs_days = 1

After that I have been getting several errors like this in a few of them:

[ERROR] mysqld: Error writing file 'mysqld-bin' (errno: 11 "Resource temporarily unavailable")

A few also show these other two errors mixed with the previous one:

[ERROR] mysqld: Error writing file 'mysqld-bin' (errno: 12 "Cannot allocate memory")
[ERROR] mysqld: Error writing file 'mysqld-bin' (errno: 0 "Internal error/check (Not system error)")

It gets stuck on this state, reporting errors to every attempt of executing a query. A restart on the service seems to solve the problem, at least temporarily.

Does anybody have a clue on why it gets stuck like that?
If the container ran out of memory, should not mariadb crash?

I could not find any information about this error and binary logs being related.

Upvotes: 0

Views: 1391

Answers (1)

Andrei Elkin
Andrei Elkin

Reputation: 11

According to some docs, may be not really fresh ones though, e.g the section B.5.2.18. 'File' Not Found and Similar Errors of https://docs.oracle.com/cd/E19078-01/mysql/mysql-refman-5.0/error-handling.html errno: 11 could be caused by open_files_limit.

Upvotes: 1

Related Questions