Multiple problems after installing Magento

I’m new to Magento and having some trouble installing components, extensions, upgrading etc etc.

THe following setup:

  • Ubuntu 18.04
  • 4 gb ram
  • 2 cpu’s
  • Magento 2.3.4
  • Fresh install

The following problems occur:

– out of RAM (.htaccess 3gb, php.ini 3gb, swap file 265mb)

– Permissions issues

– HTTP 500

So for example when i try to upgrade with composer:

I did the following:

sudo bin/magento deploy:mode:set developer sudo bin/magento setup:upgrade 

After this i got the error below.


[Sat Apr 04 10:12:27.384477 2020] [php7:error] [pid 27863] [client] PHP Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/var/www/html/var/cache/" is not writable in /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php:209nStack trace:n#0 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/var...')n#1 /var/www/html/vendor/colinmollenhour/cache-backend-file/File.php(87): Zend_Cache_Backend_File->setCacheDir('/var/www/html/v...')n#2 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array)n#3 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)n#4 /var/www/html/vendor/magento/framework/App/Cache/Frontend/Factory.php(156): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, true, true)n#5 /var/www/html/vendor/magento/framework/Cache/Frontend/Adapter/Zend.php(38): Magento\Framework\App\Cache\Frontend\Factory->Magento\Framework\App\C in /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php on line 209 

I don’t understand why its talking about permissions at the website they advice to configure the permissions as follow.

find var generated vendor pub/static pub/media app/etc -type f -exec chmod 664 {} ; find var generated vendor pub/static pub/media app/etc -type d -exec chmod 775 {} ; chmod u+x bin/magento 

Also it would be nice to know how other people configured there RAM. Are there any other configuration i need to set?

submitted by /u/itoys-shop
[link] [comments]