If you want to clear error_log to a particular size of file then you can either done this with user’s cron job or you can done this for entire server with /home.
Here is the command which can be use to add in root’s crontab which can be use to clear error_log files whose size over 2M.
find...