This is a similar to MDL-62972 - so solution possibly is same.
Mysql connections to external logstore are not reused/cached, so the amount of mysql connections is increasing.
This can best be seen during course restore. Every database reading creates a new database connection. This connections are terminated when restore process is finished.