I have suffered in a couple of times in my Joomla websites with errors like Fatal error: Out of memory (allocated 6029312) (tried to allocate 115 bytes) in /libraries/src/Language/Language.php on line 796. However during the check around the Joomla Forum, I stabled on so many answers but I was hitting a dead end.

Whenever I tried accessing Module or Plugin section in the administrator area, I always got the out of memory error.
Now below are my Steps or options I tried out during the attempts to resolve the out of memory error.
Note: These options were tried on websites between versions J3.8.0 to J3.8.12.

Option 1: Increase Memory Limit

sometimes this option can help for users with J3.8.5 websites, to find how to increase.
From your Cpanel -> move to SOFTWARE section then click on MultPHP INI Editor

Fatal error: Out of memory in Joomla

 

While under MultiPHP INI Editor, select a location which should be your domain name “domain.com” then look out for “memory_limit” and increase it to 1024M and apply settings.

Lastly clear cache and try again signing into your website.

 

Option 2: Upgrade/Change server php version to PHP70.

PHP versions have really been my biggest stambling block whenever I was facing this problem. My server offered only 3 options PHP54, PHP55, PHP56. However before fully installing PHP70 I could downgrade the website php version to PHP54 which could work but so many warnings would come from Joomla core since any version above J3.7.5 works best at PHP56.

So what I did upgraded my server and added PHP70 with just basic extensions. When I went into the Cpanel to select the PHP version to PHP70 as per steps below all worked out well.

In Cpanel, under Softwares move to MultiPHP Manager

From MultiPHP Manager, click onto your domain then select the PHP7.0 version and click apply.

NOTE: Your PHP7.0 version must have all the necessary extensions as show below fully installed for it to work well without producing errors onto your website.

Required php70 extensions (php56-libc-client, php56-pear, php56-php-bcmath, php56-php-calendar, php56-php-cli, php56-php-common, php56-php-curl, php56-php-devel, php56-php-fileinfo #56936e, php56-php-ftp, php56-php-iconv, php56-php-imap, php56-php-intl, php56-php-ioncube5, php56-php-litespeed, php56-php-mbstring, php56-php-mcrypt, php56-php-mysqlnd, php56-php-opcache, php56-php-pdo, php56-php-posix, php56-php-soap, php56-php-sockets, php56-php-suhosin, php56-php-xml, php56-php-xmlrpc, php56-php-zip, php56-runtime)

Try those steps, share with us your findings incase the above have not worked.

Fatal error: Out of memory in Joomla