Cron not working and Cron log showing Fatal error: Allowed memory size of 33554432 bytes exhausted
I have getting this error in magento 2.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried
to allocate 28672 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Package/Dumper/ArrayDumper.php
on line 89
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 425984 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Json/JsonFile.php
on line 93
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 425984 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Json/JsonFile.php
on line 93
Please help me to solve this issue. thanks in advance.
magento2 cron composer
add a comment |
I have getting this error in magento 2.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried
to allocate 28672 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Package/Dumper/ArrayDumper.php
on line 89
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 425984 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Json/JsonFile.php
on line 93
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 425984 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Json/JsonFile.php
on line 93
Please help me to solve this issue. thanks in advance.
magento2 cron composer
Seems memory limit issue, set it in php.ini or via php if it works. You can add code ini_set('memory_limit', -1); to your root index.php file to set required memory allocated. If it doesn't work then you need to contact server support to get memory limit updated.
– Himmat Paliwal
Dec 18 at 11:16
Already set ini_set('memory_limit', '-1'); in index.php but not working
– Jugal Kishor
Dec 18 at 11:18
Do You have other solution?
– Jugal Kishor
Dec 18 at 11:20
No, If you are still getting Allowed memory size issue then it is not being affected by your code added in index.php. Can you confirm the same by putting phpinfo.php to your setup?
– Himmat Paliwal
Dec 18 at 11:24
From the error it seems that you have below 256MB memory, for a smooth run of Magento 2, you will have to assign at least 2GB Memory. devdocs.magento.com/guides/v2.0/install-gde/…
– Rinto George
Dec 18 at 12:03
add a comment |
I have getting this error in magento 2.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried
to allocate 28672 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Package/Dumper/ArrayDumper.php
on line 89
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 425984 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Json/JsonFile.php
on line 93
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 425984 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Json/JsonFile.php
on line 93
Please help me to solve this issue. thanks in advance.
magento2 cron composer
I have getting this error in magento 2.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried
to allocate 28672 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Package/Dumper/ArrayDumper.php
on line 89
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 425984 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Json/JsonFile.php
on line 93
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 425984 bytes) in
/home/www/public_html/website.com/vendor/composer/composer/src/Composer/Json/JsonFile.php
on line 93
Please help me to solve this issue. thanks in advance.
magento2 cron composer
magento2 cron composer
edited Dec 18 at 11:24
user74006
asked Dec 18 at 11:10
Jugal Kishor
34112
34112
Seems memory limit issue, set it in php.ini or via php if it works. You can add code ini_set('memory_limit', -1); to your root index.php file to set required memory allocated. If it doesn't work then you need to contact server support to get memory limit updated.
– Himmat Paliwal
Dec 18 at 11:16
Already set ini_set('memory_limit', '-1'); in index.php but not working
– Jugal Kishor
Dec 18 at 11:18
Do You have other solution?
– Jugal Kishor
Dec 18 at 11:20
No, If you are still getting Allowed memory size issue then it is not being affected by your code added in index.php. Can you confirm the same by putting phpinfo.php to your setup?
– Himmat Paliwal
Dec 18 at 11:24
From the error it seems that you have below 256MB memory, for a smooth run of Magento 2, you will have to assign at least 2GB Memory. devdocs.magento.com/guides/v2.0/install-gde/…
– Rinto George
Dec 18 at 12:03
add a comment |
Seems memory limit issue, set it in php.ini or via php if it works. You can add code ini_set('memory_limit', -1); to your root index.php file to set required memory allocated. If it doesn't work then you need to contact server support to get memory limit updated.
– Himmat Paliwal
Dec 18 at 11:16
Already set ini_set('memory_limit', '-1'); in index.php but not working
– Jugal Kishor
Dec 18 at 11:18
Do You have other solution?
– Jugal Kishor
Dec 18 at 11:20
No, If you are still getting Allowed memory size issue then it is not being affected by your code added in index.php. Can you confirm the same by putting phpinfo.php to your setup?
– Himmat Paliwal
Dec 18 at 11:24
From the error it seems that you have below 256MB memory, for a smooth run of Magento 2, you will have to assign at least 2GB Memory. devdocs.magento.com/guides/v2.0/install-gde/…
– Rinto George
Dec 18 at 12:03
Seems memory limit issue, set it in php.ini or via php if it works. You can add code ini_set('memory_limit', -1); to your root index.php file to set required memory allocated. If it doesn't work then you need to contact server support to get memory limit updated.
– Himmat Paliwal
Dec 18 at 11:16
Seems memory limit issue, set it in php.ini or via php if it works. You can add code ini_set('memory_limit', -1); to your root index.php file to set required memory allocated. If it doesn't work then you need to contact server support to get memory limit updated.
– Himmat Paliwal
Dec 18 at 11:16
Already set ini_set('memory_limit', '-1'); in index.php but not working
– Jugal Kishor
Dec 18 at 11:18
Already set ini_set('memory_limit', '-1'); in index.php but not working
– Jugal Kishor
Dec 18 at 11:18
Do You have other solution?
– Jugal Kishor
Dec 18 at 11:20
Do You have other solution?
– Jugal Kishor
Dec 18 at 11:20
No, If you are still getting Allowed memory size issue then it is not being affected by your code added in index.php. Can you confirm the same by putting phpinfo.php to your setup?
– Himmat Paliwal
Dec 18 at 11:24
No, If you are still getting Allowed memory size issue then it is not being affected by your code added in index.php. Can you confirm the same by putting phpinfo.php to your setup?
– Himmat Paliwal
Dec 18 at 11:24
From the error it seems that you have below 256MB memory, for a smooth run of Magento 2, you will have to assign at least 2GB Memory. devdocs.magento.com/guides/v2.0/install-gde/…
– Rinto George
Dec 18 at 12:03
From the error it seems that you have below 256MB memory, for a smooth run of Magento 2, you will have to assign at least 2GB Memory. devdocs.magento.com/guides/v2.0/install-gde/…
– Rinto George
Dec 18 at 12:03
add a comment |
1 Answer
1
active
oldest
votes
I was facing the same issue but was able to resolve.
- Php path which cron was using was incorrect, hence absolute path should be used.
- Memory limit for PHP-CLI and PHP was different, so passed the params to override in CLI.
Example:
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /opt/lampp/htdocs/magento/enterprise/var/log/magento.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/update/cron.php >> /opt/lampp/htdocs/magento/enterprise/var/log/update.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento setup:cron:run >> /opt/lampp/htdocs/magento/enterprise/var/log/setup.cron.log
/opt/lampp/bin/php
: My PHP path.
/opt/lampp/htdocs/magento/enterprise/bin/magento
: My Magento CLI path
memory_limit=2G
: Memory limit set to 2G, you can update to it as your server limits.
memory limit issue resolved but email sending not working.
– Jugal Kishor
Dec 18 at 11:57
Did memory limit issue resolved by adding the code as above ?
– Milind Singh
Dec 18 at 12:04
For email, you need to setup sendmail. Try gist.github.com/adamstac/7462202
– Milind Singh
Dec 18 at 12:04
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f255044%2fcron-not-working-and-cron-log-showing-fatal-error-allowed-memory-size-of-335544%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I was facing the same issue but was able to resolve.
- Php path which cron was using was incorrect, hence absolute path should be used.
- Memory limit for PHP-CLI and PHP was different, so passed the params to override in CLI.
Example:
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /opt/lampp/htdocs/magento/enterprise/var/log/magento.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/update/cron.php >> /opt/lampp/htdocs/magento/enterprise/var/log/update.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento setup:cron:run >> /opt/lampp/htdocs/magento/enterprise/var/log/setup.cron.log
/opt/lampp/bin/php
: My PHP path.
/opt/lampp/htdocs/magento/enterprise/bin/magento
: My Magento CLI path
memory_limit=2G
: Memory limit set to 2G, you can update to it as your server limits.
memory limit issue resolved but email sending not working.
– Jugal Kishor
Dec 18 at 11:57
Did memory limit issue resolved by adding the code as above ?
– Milind Singh
Dec 18 at 12:04
For email, you need to setup sendmail. Try gist.github.com/adamstac/7462202
– Milind Singh
Dec 18 at 12:04
add a comment |
I was facing the same issue but was able to resolve.
- Php path which cron was using was incorrect, hence absolute path should be used.
- Memory limit for PHP-CLI and PHP was different, so passed the params to override in CLI.
Example:
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /opt/lampp/htdocs/magento/enterprise/var/log/magento.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/update/cron.php >> /opt/lampp/htdocs/magento/enterprise/var/log/update.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento setup:cron:run >> /opt/lampp/htdocs/magento/enterprise/var/log/setup.cron.log
/opt/lampp/bin/php
: My PHP path.
/opt/lampp/htdocs/magento/enterprise/bin/magento
: My Magento CLI path
memory_limit=2G
: Memory limit set to 2G, you can update to it as your server limits.
memory limit issue resolved but email sending not working.
– Jugal Kishor
Dec 18 at 11:57
Did memory limit issue resolved by adding the code as above ?
– Milind Singh
Dec 18 at 12:04
For email, you need to setup sendmail. Try gist.github.com/adamstac/7462202
– Milind Singh
Dec 18 at 12:04
add a comment |
I was facing the same issue but was able to resolve.
- Php path which cron was using was incorrect, hence absolute path should be used.
- Memory limit for PHP-CLI and PHP was different, so passed the params to override in CLI.
Example:
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /opt/lampp/htdocs/magento/enterprise/var/log/magento.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/update/cron.php >> /opt/lampp/htdocs/magento/enterprise/var/log/update.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento setup:cron:run >> /opt/lampp/htdocs/magento/enterprise/var/log/setup.cron.log
/opt/lampp/bin/php
: My PHP path.
/opt/lampp/htdocs/magento/enterprise/bin/magento
: My Magento CLI path
memory_limit=2G
: Memory limit set to 2G, you can update to it as your server limits.
I was facing the same issue but was able to resolve.
- Php path which cron was using was incorrect, hence absolute path should be used.
- Memory limit for PHP-CLI and PHP was different, so passed the params to override in CLI.
Example:
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /opt/lampp/htdocs/magento/enterprise/var/log/magento.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/update/cron.php >> /opt/lampp/htdocs/magento/enterprise/var/log/update.cron.log
*/5 * * * * /opt/lampp/bin/php -d memory_limit=2G /opt/lampp/htdocs/magento/enterprise/bin/magento setup:cron:run >> /opt/lampp/htdocs/magento/enterprise/var/log/setup.cron.log
/opt/lampp/bin/php
: My PHP path.
/opt/lampp/htdocs/magento/enterprise/bin/magento
: My Magento CLI path
memory_limit=2G
: Memory limit set to 2G, you can update to it as your server limits.
edited Dec 18 at 11:32
answered Dec 18 at 11:27
Milind Singh
581115
581115
memory limit issue resolved but email sending not working.
– Jugal Kishor
Dec 18 at 11:57
Did memory limit issue resolved by adding the code as above ?
– Milind Singh
Dec 18 at 12:04
For email, you need to setup sendmail. Try gist.github.com/adamstac/7462202
– Milind Singh
Dec 18 at 12:04
add a comment |
memory limit issue resolved but email sending not working.
– Jugal Kishor
Dec 18 at 11:57
Did memory limit issue resolved by adding the code as above ?
– Milind Singh
Dec 18 at 12:04
For email, you need to setup sendmail. Try gist.github.com/adamstac/7462202
– Milind Singh
Dec 18 at 12:04
memory limit issue resolved but email sending not working.
– Jugal Kishor
Dec 18 at 11:57
memory limit issue resolved but email sending not working.
– Jugal Kishor
Dec 18 at 11:57
Did memory limit issue resolved by adding the code as above ?
– Milind Singh
Dec 18 at 12:04
Did memory limit issue resolved by adding the code as above ?
– Milind Singh
Dec 18 at 12:04
For email, you need to setup sendmail. Try gist.github.com/adamstac/7462202
– Milind Singh
Dec 18 at 12:04
For email, you need to setup sendmail. Try gist.github.com/adamstac/7462202
– Milind Singh
Dec 18 at 12:04
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f255044%2fcron-not-working-and-cron-log-showing-fatal-error-allowed-memory-size-of-335544%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Seems memory limit issue, set it in php.ini or via php if it works. You can add code ini_set('memory_limit', -1); to your root index.php file to set required memory allocated. If it doesn't work then you need to contact server support to get memory limit updated.
– Himmat Paliwal
Dec 18 at 11:16
Already set ini_set('memory_limit', '-1'); in index.php but not working
– Jugal Kishor
Dec 18 at 11:18
Do You have other solution?
– Jugal Kishor
Dec 18 at 11:20
No, If you are still getting Allowed memory size issue then it is not being affected by your code added in index.php. Can you confirm the same by putting phpinfo.php to your setup?
– Himmat Paliwal
Dec 18 at 11:24
From the error it seems that you have below 256MB memory, for a smooth run of Magento 2, you will have to assign at least 2GB Memory. devdocs.magento.com/guides/v2.0/install-gde/…
– Rinto George
Dec 18 at 12:03