1

Live production site went down suddenly. I created a custom cron job to enable/disable products in the site and the job ran successfully. 3 people placed order and suddenly the Live site went down and following are the series if events that happened: 1) "There has been an error processing your request" 2) "Can't create directory /var/www...../generation" 3) Runtime exception 4) Customers who were logged in were logged out

Then the site got restored, all in 1 minute. In the exception log all that I can see is an "Warning: ltrim() expects parameter 1 to be string, array given". I need urgent help with this. I want to know why the site went down.

  • This is because you dont have permission to your magento root to create directory. Somehow generated folder has been deleted for your website and now web user (www-data) is not able to create the directory. Set proper permission to magento root then it will work. – Sukumar Gorai Jul 4 '18 at 7:28
  • Hi sorry forgot to mention the site restarted by itself. I didn't do anything in the backend. I got the error then the site fixed by itself and all is fine now. – Vaish Jul 4 '18 at 9:54
  • Great. Happy Coding. – Sukumar Gorai Jul 4 '18 at 9:59
  • My question is how come the site crashed and came up. By the way the permission for var and var/generation folder is "drwxrwxrwx" and user is "www-data" – Vaish Jul 4 '18 at 10:00
  • Hi the following is the series of events - i used product scheduler to enable some products and when the job was run the products were being enabled and some customers started ordering straight away. At the same time "reindexer" job was triggered that tried to update the stock count for the same products and this created a deadlock situation.Then Magento "reindexer invalidate" function got kicked in automatically and my site started displaying warning messages. – Vaish Jul 6 '18 at 8:06

Your Answer

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

Browse other questions tagged or ask your own question.