Before the fix, I tried to install the printful module, got through to Step 3 to where you enable the module and paused half way through execution. The front or back-end wasn't loading and after ages of trying to load it, it gave me this error on my browser:


I followed this link on fixing this error, changing localhost to This worked, as I can log in to the back-end and the front-end loads but is taking forever to load to the next page that I navigate to, sometimes so long that it times the admin account out and goes back to the login.

I've allocated 2G in the PHP memory_limit, but when I go to bin/magento c:c I get this error:

mmap() failed: [12] Cannot allocate memory
PHP Fatal error:  Out of memory (allocated 10485760) (tried to allocate 12288 bytes) in /var/www/html/vendor/zendframework/zend-uri/src/Uri.php on line 1024

I am so confused.

  • php -d memory_limit=5G bin/magento c:c run this command Apr 22, 2020 at 20:20

1 Answer 1


You could resolve this issue by setting the database hostname as instead of localhost . In your /app/etc/env.php file.

Second you logout automatically.I think your magento account problem .So you new create username and password.So you go to Stores → Configuration and open Advanced → Admin → Security. By default, Magento has the session time around 900 seconds which is around 15 minutes but you can increase this easily with any number you want.

For example, you can double this session time to 1800 so the Admin Session Lifetime is around 30 minutes. Change the setting and Save the Config to save the changes.

And third your problem run this command :- php -d memory_limit=5G bin/magento c:c

Hope help you


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.