Frequent internal server error 500 + unable to backup database

Started by krystal, July 10, 2018, 05:23:38 PM

Previous topic - Next topic

krystal

Quote from: GigaWatt on July 12, 2018, 10:03:48 PM
Why don't you just ask the support team from your host to try and click on some of the menus and see for themselves that this is not actually a problem with the software, it's happening randomly and it started since they restarted the service.

I already did that right at the beginning. I even created a temporary account for them on the forum so they could test it as a user and not just a guest. I have given them as much information as I can right down to the date and time it started happening.

They did test it a few times (not always the same support member) and they also encountered the errors, but they haven't come up with a solution. The last suggestion they gave was to add a rule to .htaccess for Limitinternalrecursion. I haven't done that yet.

Illori

if your host will not help you resolve the issue, then it might be time to look for a new host.

GigaWatt

Try adding this to .htaccess before RewriteEngine On.

LimitInternalRecursion 30

If the forum still emits a 500 error, check the server's error log, if the error message changed to "Request exceeded the limit of 30 internal redirects due to probable configuration error.", as Illori said, I'd look for a different host.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

krystal

Quote from: GigaWatt on July 13, 2018, 06:17:15 AM
If the forum still emits a 500 error, check the server's error log, if the error message changed to "Request exceeded the limit of 30 internal redirects due to probable configuration error.", as Illori said, I'd look for a different host.

Thanks! I added the code :)

The error message in the log now is:

[Fri Jul 13 05:56:20 2018] [alert] [client xx] /home/playmo/playmofriends.com/.htaccess: LimitInternalRecursion not allowed here

Kindred

lol... that means that your host does not allow you to configure the server like that.

take out the line
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

krystal

Quote from: Kindred on July 13, 2018, 09:15:20 AM
lol... that means that your host does not allow you to configure the server like that.

Weird since they were the ones who first suggested adding it! ::)

Quotetake out the line

I took it out straight away since the whole site went down when I tested it.


So the fault for the repeated 500 errors definitely lies with the host in this case?
It wouldn't be due to a file somehow becoming corrupt?
(Please excuse my lack of knowledge  :-[ )

GigaWatt

I don't think it's a corrupt file problem because it happens randomly, sometimes the requested link loads, sometimes it doesn't... maybe malfunctioning hardware (disk, storage, etc.), but that's their problem, not yours.

Ask them to transfer you to another rig (server). You'll have to reconfigure your forum, but even if you change hosts, you'd have to do it anyway, so... at least this way you don't have to go through all if the bureaucracy.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Kindred

Actually, since it is intermittent, the chances are that there is a badly formed code bit somewhere which is only triggered in some circumstances
(like an advert that rotates - the error only happens when the badly formed advert gets into the dipslay)

So, what mods do you have installed?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

krystal

Quote from: GigaWatt on July 13, 2018, 11:33:30 AM
Ask them to transfer you to another rig (server). You'll have to reconfigure your forum, but even if you change hosts, you'd have to do it anyway, so... at least this way you don't have to go through all if the bureaucracy.

I'll definitely give that a try if nothing else works! :)

Quote from: Kindred on July 13, 2018, 11:45:00 AM
So, what mods do you have installed?

These are the only ones I have.
I try to keep things as simple as possible.
None of these were added or modified recently.

1.    Add Social Media Icons To Profiles    1.0.7    
2.    Bookmarks    2.5    
3.    Started By Column    1.41    
4.    Custom Tab    1.2    
5.    Bakers Dozen Pages    1.2

Aleksi "Lex" Kilpinen

There's been quite a few errors referenced in this topic already, with different solutions suggested, so just to clear up things a bit.

What kind of errors are you now seeing, could you copy paste a few here in full?
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

krystal

Quote from: Aleksi "Lex" Kilpinen on July 14, 2018, 04:24:19 AM
What kind of errors are you now seeing, could you copy paste a few here in full?

Today's server log attached :)

Aleksi "Lex" Kilpinen

OK, mostly it is the "Premature end of script headers"

Firstly, I would go through all your file and folder permissions, and try to make sure they are not writable to the whole world - to see if that fixes it.

If not, well - that error is one of the vaguest of them all - and has a load of different possible causes, mostly on the server side.
https://www.liquidweb.com/kb/apache-error-premature-end-of-script-headers/
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Arantor

Premature end of script headers usually means the PHP process crashed, and that's nothing you can fix.

krystal

Quote from: Aleksi "Lex" Kilpinen on July 15, 2018, 03:43:44 AM
OK, mostly it is the "Premature end of script headers"

Firstly, I would go through all your file and folder permissions, and try to make sure they are not writable to the whole world - to see if that fixes it.

All the directories are 755
The files within them vary. Most are 644, but some are 666.
I don't know enough about permissions to tell if they are correct or not (example screenshot attached)

Quote from: Arantor on July 15, 2018, 05:10:41 AM
Premature end of script headers usually means the PHP process crashed, and that's nothing you can fix.

That seems to be the most likely conclusion. :(

GigaWatt

Quote from: krystal on July 15, 2018, 06:33:22 PM
All the directories are 755
The files within them vary. Most are 644, but some are 666.

Try changing those with 666 to 644, but make a note of the files that you're going to change (just in case ;)).

Directories should be 755, that's OK ;).

Also, check if there are any php files or directories with 777 permissions. Change the directories to 755 and the php files to 644.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

krystal

Quote from: GigaWatt on July 15, 2018, 08:20:57 PM
Quote from: krystal on July 15, 2018, 06:33:22 PM
All the directories are 755
The files within them vary. Most are 644, but some are 666.

Try changing those with 666 to 644, but make a note of the files that you're going to change (just in case ;)).

Directories should be 755, that's OK ;).

Also, check if there are any php files or directories with 777 permissions. Change the directories to 755 and the php files to 644.

Thanks for the suggestion!
I've done this and given it a test.
Still getting random errors every so often - not sure if they are less frequent now or if that is just wishful thinking. ;)

GigaWatt

I clicked around the site on topics, boards, main menu items... didn't get one error.

They are either less frequent or maybe it depends on server load ???.... who knows.

Could you ask your host to switch you to another physical server (not the one you're on currently)?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

krystal

Quote from: GigaWatt on July 16, 2018, 09:58:45 PM
Could you ask your host to switch you to another physical server (not the one you're on currently)?

I have just sent them a message asking if this would be possible.  :)

krystal

Got a reply

QuoteThanks for contacting tech support and I'm sorry to hear about the issue.
I recommend to change PHP version to 7.0 and copy the phprc settings
over to it from PHP 5.6 to see if that will help.

Does this sound like a possible solution?
They've sent me instructions on how to do it.

GigaWatt

Hmmm... with the randomness of the error, I'm not surprised if it worked :P.

Give it a go, it can't hurt to try ;). SMF 2.0.15 is compatible with 7.0, but not all mods. Check the admin error log to see if some errors keep frequently repeating themselves. If this is the case, it's possible some mod is not up to date.

But, if the suggested solution does work and you stop getting the 500 error... hey, at least a bigger problem is solved :).

Let's just see how everything goes and worry about minor problems later ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Advertisement: