1

I just did an update from 1.9.3.1 to 1.9.3.6 with the connect manager. Since then the website is unreachable. It sometimes works if I refresh multiple times but I get an error 500 most of the time.

I checked the log and it seems the cronjob is spamming this error:

2017-11-02T12:37:28+00:00 ERR (3): Warning: shell_exec(): Unable to execute '/bin/sh '/html/my-shop/cron.sh' 'cron.php' -malways 1 \> /dev/null 2\>\&1 \&' in /html/my-shop/cron.php on line 67

The host is a shared hosting solution so I am not able to see apache or nginx logs. Maybe the cronjob failing is causing the host to shutdown further connections ? How can I fix this issue?

  • did you set right permission ? – Pankaj Pareek Nov 2 '17 at 12:48
  • I gave 777 to cron.sh and cron.php and it still not working. I completely new to magento sorry.. – user6800816 Nov 2 '17 at 12:50
  • you are getting 500 error on site ? Or only cron that is creating the issue ? – Pankaj Pareek Nov 2 '17 at 12:51
  • Yes. Sometimes it works if I refresh multiple times. It seems this cron issue is spamming so hard that the host is blocking the connection – user6800816 Nov 2 '17 at 12:52
0

As you are on shared hosting, may be shell command is not allowed to execute on server.

Add the below line of code

$isShellDisabled = true;

After the below line:

$isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;

You can set up permission by running the clean up script

  • thanks a lot, it works now. What happens if I leave cron disabled ? I guess a lot of magento functions will not work ? – user6800816 Nov 2 '17 at 13:06
  • Cron is required otherwise order email, catalog rule stop working – Pankaj Pareek Nov 2 '17 at 13:07
  • It did work before the upgrade. Should I do a rollback or is there a fix or a way to debug this ? – user6800816 Nov 2 '17 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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