Hi Craig, Thanks for your quick response… Ok I got round it, I was under the impression I would be using the new created user for the logins but then realised it was still root. Anyways I got it all up and running back and frontend but now stumbling across this error when trying to install the demo data
Do you want to store credentials for repo.magento.com in /var/www/html/var/composer_home/auth.json ? [Yn] Y
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 20 installs, 0 updates, 0 removals
Installing magento/module-catalog-sample-data (100.3.0): Downloading (100%)
proc_open(): fork failed - Cannot allocate memory
The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
Unzip with unzip command failed, falling back to ZipArchive class
The following exception is caused by a lack of memory or swap, or not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details
I’ve seen this before. It was related to the available system memory of the server. Composer+Magento struggle to run with anything less than 2GB.
Check that your server meets the minimum requirements
Check that you’ve allocated at least 2GB of memory in .htaccess (covered in the guide under Update memory_limit)
Verify that the above is set correctly by following 2. Listing critical PHP information on this post. This will show you the true value of memory_limit for the local directory
Ok, I can confirm that htaccess is setup to 2G on both, Not sure how I get to the the little snippet screenshot your showing?.. also, following your guide basically leaves all amendments including the download of magento to finishing up activating developer mode and installing demo content in the magento user and not admin, is this correct?
My last reply has a link to a post, where it explains how to view your php information (like screenshot) under the 2. Listing critical PHP information heading.
Yes, there is no need to be root user unless you’re changing system files or restarting service such as apache, mysql or the server itself. Any actions you carry out on Magento whilst in the /var/www/html/ folder will usually be done as magento.
Ok, not sure whether it was a max 4gb on the vps i had, but i have just setup a hetzner vps with dual vcpu with 8gb ram, only cost 10eu so bargain :D… Just at the final stages of setting up developer and taking snapshot, so will keep you updated.
Hey Craig, All seems to have gone in and done successfully this time, no errors as far as i can see. Only thing now is the back/frontend is real slow at loading up… was instant before the demo content install… htop showing cpu maxed out with /usr/sbin/apache2 -k start. any ideas?
High CPU load happens sometimes when caching everything for the first time. Make sure all of your caches are enabled as this will significantly reduce the load once everything it cached. You can do that in the backend or via CLI using either of these 2 commands (they do the same thing):
Yes, any bin/magento commands should be run as magento user within /var/www/html.
Technically speaking, you can run the command from anywhere but I keep all my instructions within the same folder because it’s good practice and results in simpler commands.
Oh yes, that nailed it my good friend, Thankyou for an awesome tutorial and your continued support today, Hope you dont mind if I get in touch if I get stuck !!