Internal Server Error "Too many connections"

i take a backup of one server and put it in other
first time it worked well
but now i get this error
Internal Server Error
i check the MariaDB status
it is running
i try to do migrate i get this error
ERROR 1040 (08004): Too many connections

i restart the server and it worked with me