Grav website down (HTTP 500) - can't troubleshoot solution

I did want to want to try to solve this myself without hitting the forums but I’ve come to a dead end. Last night, I had finally managed to get the website set up with SSL using LetsEncrypt. The certificates passed and the website was functioning fine.

This morning I’ve gone to check the site and it can’t connect and I get an error 500. I tried tweaking a few things and now it won’t connect at all :slight_smile:

I tried a few things with .htaccess and no dice. I did the error log and there was something about not being able to save from cache to rockettheme. I’ve didn’t save it. But to be honest, the problem feels different. Anyway, I am completely lost now and hoping someone can help.

https://canyonzcc.com

Looks like your site is online again.

Yes, luckily an old friend came to my rescue and saved the day.

@rhys, Might be helpful to others in the community if you could share a bit more details about the solution…

1 Like

As per @anon76427325’s post, a solution not shared is not a solution, so unmarked your reply as a solution. Please share so others can benefit now and in the future.

So, whilst I didn’t find the solution myself, nor fully identify the problem in my first post, I can now offer some more information.

It turns out that the SSL certificates were not the problem at all and that installation had been fine. Instead the problem had been with the scheduler. It turns out there was a cron job running which f’d up the permissions.

I pasted this into the terminal and it didn’t seem to work and ‘no cron available’ appeared at the top of the admin panel in the tools section.

(crontab -l; echo "* * * * * cd /home/grav/www/html;/usr/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab -

I thought nothing of it until the website went down. Then with my friends help we got it back online. Until it went down again during the night. At that point, it became obvious it was a permissions issue caused by a cron job.

I believe this is because I ran the code from the terminal logged in as root, instead of logged in as the ‘grav’ user that I created during the installation of grav.

In the end, I believe my friend opted for the script option on ths page https://learn.getgrav.org/16/troubleshooting/permissions. I don’t think it has cured the underlying problem but the website does now remain online at least.

So it’s a half solution.

1 Like