This causes quite a bit of performance overhead, we see up-to a dozen MySQL inserts per second, check yours:
```
MariaDB [whmcs]> select (select created_at from tblerrorlog order by created_at desc limit 1) as start, (select created_at from tblerrorlog order by created_at asc limit 1) as end, (select created_at from tblerrorlog order by created_at desc limit 1)-(select created_at from tblerrorlog order by created_at asc limit 1) as seconds, (select count(*) from tblerrorlog) as totalrows;
+---------------------+---------------------+---------+-----------+
| start | end | seconds | totalrows |
+---------------------+---------------------+---------+-----------+
| 2020-12-30 09:54:32 | 2020-12-30 09:38:33 | 1599 | 14005 |
+---------------------+---------------------+---------+-----------+
1 row in set (0.02 sec)
```