mysql max_binlog_size is not working I have a weird problem. I am currently using mysql and have defined 100M of max_binlog_size. However, I have hundreds of files created every day and each file is of no more then 2MB or 3MB each and sometime less. 

I do not understand why is this so the file should be around 100M each?

Can someone have insights to it.
When binary logs do not reach the limit set by max_binlog_size, there are two(2) major reasons why 


mysqld closes the currently open binlog and opens a new binlog


Running service mysql restart
Running service mysql top followed by service mysql start
mysqld crashes and mysqld_safe restarts it if the mysqld crash was not severe

Running FLUSH LOGS will do the following


Close and Reopen the Error Log
Close and Reopen the General Log
Close and Reopen the Slow Log
Close and Reopen Engine Logs
Close the Currently Open Binary Log and Open a New Binary Log



It says the following the MySQL Documentation under FLUSH LOGS


  With no log_type option, FLUSH LOGS closes and reopens all log files. If binary logging is enabled, the sequence number of the binary log file is incremented by one relative to the previous file.


SUGGESTIONS


Look in your error log to see if mysqld crashes and restarts. The timestamp should match the binlog that was closed. The error log will also show the reason for the crash, or at least leave you a trail to attempt to troubleshoot
If your code or some cronjob is running FLUSH LOGS, do one of the following:


Replace it with FLUSH ENGINE LOGS;
Stop using FLUSH LOGS altogether
Live with it. Having 2M or 3M binary logs is not all that bad