If you are using DirectAdmin and get this error during publication website then it most probably means that there is one or more quite large files uploaded into media library and they require a little more memory to be published. By default there is a limit of 128M setup in DirectAdmin for PHP. To increase it take the following steps:
login to server terminal as root user
type command php --ini. One of lines in output will be:
Loaded Configuration File: [path of php.ini file]
open this file with editor: nano [path of php.ini file] (replace here "[path of php.ini file]" with your path)
find needed line by pressing Ctrl+W, then typing "memory_limit" and pressing Enter
increase the value for this parameter (if it is 128M - try to increase it to 256M)
save file.
After that check the publication of website again whether the error is gone.