500 Errors on Cache Purge Redux

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

500 Errors on Cache Purge Redux

Post by shortmort37 »

Support Request Template
What version of phpBB are you using? phpBB 3.3.3
What is your board's URL? www.54plymouth.net/54plymouth
Who do you host your board with? inmotionhosting.com
How did you install your board? I used a tool provided by my host
What is the most recent action performed on your board? Fresh Install
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? No
What styles do you currently have installed? prosilver
What language(s) is your board currently using? English
Which database type/version are you using? MariaDB
What is your level of experience? Comfortable with PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Clearing the cache.
Please describe your problem.

Last June, I started getting 500 errors whenever I clear the cache; my struggles to resolve the issue are documented here. I persisted, and my service provider moved my shared host account to a new server (still shared host). The issues abated. This March, they reappeared.

Last June, I used a barebones Softaculous install of phpBB to demonstrate the problem to my provider. This same installation (upgraded to 3.3.3 now) again demonstrates the problem. It is totally out of the box - not even a post has been added, there is just the one "Welcome" post. I clear the cache, and return to the index page without error. But as soon as I click on the single forum, I get a 500 error; after a half dozen tries, the error goes away and the topic presents. Click on the topic, and again, a 500 error. Persist, and the error goes away.

I have www.54plymouth.net/54forum directory protected, so bots don't replenish the cache. In any event, they can't authenticate, which is required to reply, or post - both of which cause additional 500 errors, as do administrative actions. I will supply credentials to any interested investigator; they are the same credentials for administrative access to enter the ACP and clear the cache.

What I have done:
I have enabled PHP error logging, with the level set to E_ALL. I also created a page with this code, which attempts to load a non-existent module - and generates a 500 error as a consequence:

Code: Select all

<?php
asd();
?>
This error is logged in the php error_log file; however, the 500 errors created by clearing the cache, are not.

I asked my service provider for a copy of the Apache logs on the shared server, filtered on 54forum. They obliged; at the same time, I recursively copied off the cache directory at each 500 error. It just so happens that the hour interval during which I performed this diagnostic, was bracketed by two "access denied" errors generated by hack attempts (which happen all the time, and which were blocked). But, no 500 errors were reported during the interval where I was creating them.

I asked my service provider if they could change the error logging level to debug or trace5, using a SetEnvIf Request_URI on 54forum; they denied this request, saying its not a service they provide on shared hosts. They suggested I move to a VPS to further diagnose. But I know if I pay for a VPS, the problem will go away! And so will the unlimited disk and memory resources I have with my grandfathered shared plan (I've been a customer for 12 years).

Any ideas about what I can do to further diagnose, without abandoning ship?
Generated by SRT Generator
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: 500 Errors on Cache Purge Redux

Post by david63 »

The one thing that stands out to me is
shortmort37 wrote: Thu May 06, 2021 6:44 pm I have www.54plymouth.net/54forum directory protected,
Have you tried removing whatever protection you have on that directory to see if that is the cause of the problem?
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: 500 Errors on Cache Purge Redux

Post by shortmort37 »

David, the 500 errors occurred *before* I protected the directory.

I only protected the directory to keep bots from crawling the site, generating 500 errors that eventually replenish the cache. That way, I can demonstrate to my ISP (or, to you, or to whoever has the credentials) that there is a problem before the bots get to it.

Of course, the bots can only replenish what they can get to without an account, i.e., they can’t cache the pages for a reply or a post. Otherwise, they would be a solution! But a bandaid, at that; what is causing the 500 errors to begin with?
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: 500 Errors on Cache Purge Redux

Post by 3Di »

First of all a 500 is something hard to debug but you can try disabling JS in your browser then reload the ACP page and try again purging the cache, if we are lucky we will see a debug error.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: 500 Errors on Cache Purge Redux

Post by shortmort37 »

Here's another option, for anyone who wants to investigate this issue, and since www.54plymouth.net/54forum is a throwaway test site: I have removed directory protections. That means that bots will replenish the cache after purging (and after generating 500 errors) through their persistence, for all pages not requiring a log in. However, a reply or a post will not be an option for a bot. If anyone registers on the site for the purposes of investigating, I will make you a founder with administrative privileges, permitting you to clear the cache. Unless you can beat the bots to it, you won't see a 500 error until you reply to a post - or, create a new one.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: 500 Errors on Cache Purge Redux

Post by shortmort37 »

3Di wrote: Thu May 06, 2021 10:12 pm First of all a 500 is something hard to debug but you can try disabling JS in your browser then reload the ACP page and try again purging the cache, if we are lucky we will see a debug error.
Interesting thought! I followed the instructions for Chrome, to disable javascript; purged the cache and triggered 500 errors, but nothing got logged in the php error_log, unfortunately.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: 500 Errors on Cache Purge Redux

Post by 3Di »

shortmort37 wrote: Thu May 06, 2021 11:05 pm ...
Interesting thought! I followed the instructions for Chrome, to disable javascript; but nothing got logged in the php error_log, unfortunately.
It should be seen directly on the forums, not error_log.
Next step is to enable the debugger in phpBB 3.3.x, see: https://phpbbstudio.com/viewtopic.php?f=11&t=130
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: 500 Errors on Cache Purge Redux

Post by david63 »

Let's just have a recap here.

This problem appears to be unique to you as no other users of phpBB have reported such a problem (that is not to say that others have not had the problem)

You had this problem last June, your hosts moved you to another server and the problem went away. This problem has now reappeared with nothing having changed.

This would lead me to believe that the problem is with the server/hosts. Either your server is/has run out of resources (perhaps due to some other user on the same shared server doing something) or, and don't ask me what, your hosts have changed a setting on the server, perhaps due to a version update/upgrade to something and not reconfiguring as before.

Personally I do not believe that this is a phpBB problem as you say that the error goes away eventually which would imply that phpBB is working correctly.

One thought that may be worth looking into is who is the file owner for the files in the cache folder. If you go log into your board via ftp there should be a column called owner (normally at the right). If this is different to the owner of the other files on the board then this may be the problem.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: 500 Errors on Cache Purge Redux

Post by shortmort37 »

David, I would agree. I believe it to be a resource contention issue, and I have argued this to my service provider. They say it is phpBB software, and I should be talking to developers. Rubbish! But without more explicit control over what gets logged by Apache, I am at a loss.

If there were an issue with file protections in the cache, wouldn’t it persist? It doesn’t - after enough hammering and generating 500 errors, it goes away.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26503
Joined: Fri Aug 29, 2008 9:49 am

Re: 500 Errors on Cache Purge Redux

Post by Mick »

Ask to speak to level two support or even a manager, you may get more assistance that way. There’s always the “well, if you don’t fix it I’ll move to another host” line, see what happens. ;)
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: 500 Errors on Cache Purge Redux

Post by shortmort37 »

3Di wrote: Thu May 06, 2021 11:08 pm It should be seen directly on the forums, not error_log.
Next step is to enable the debugger in phpBB 3.3.x, see: https://phpbbstudio.com/viewtopic.php?f=11&t=130
Oops! OK, I’m traveling at the moment, but will retry at my destination.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: 500 Errors on Cache Purge Redux

Post by shortmort37 »

Mick wrote: Fri May 07, 2021 9:53 am Ask to speak to level two support or even a manager, you may get more assistance that way. There’s always the “well, if you don’t fix it I’ll move to another host” line, see what happens. ;)
Actually, last year I had signed a (money back if not satisfied) contract with another provider, when my current provider offered to move me. Because I could not get the basic Softaculous install of phpBB to work with the new provider - my baseline diagnostic - and because the problem went away when the old provider moved me to a new shared server, I ditched the new provider.

But I can’t keep doing this every 9 months. It would be so much better if I could say to the provider, you ran out of “gazoutas” on this server, fix it. But I need to identify the gazoutas.

phpBB is not responsible for these errors; but certainly, it *triggers* the errors. Why? In basic terms, with the cache purged,

The user invokes a page (e.g., open a post);
The code responsible for presenting that content is not cached;
phpBB retrieves the code to cache; and
Then executes the code.

What about that sequence upsets Apache, in a way that doesn’t occur if the code were already cached? A timeout? It would have to be milliseconds; the 500 error presents immediately. Is it a spike in I/O?

It’s something. But what?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26503
Joined: Fri Aug 29, 2008 9:49 am

Re: 500 Errors on Cache Purge Redux

Post by Mick »

As David (I think) already said though there are tens of thousands of installations out there without this issue. I wonder how many phpBB boards your host hosts, it would be interesting to know.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: 500 Errors on Cache Purge Redux

Post by 3Di »

shortmort37 wrote: Fri May 07, 2021 10:06 am
3Di wrote: Thu May 06, 2021 11:08 pm It should be seen directly on the forums, not error_log.
Next step is to enable the debugger in phpBB 3.3.x, see: https://phpbbstudio.com/viewtopic.php?f=11&t=130
Oops! OK, I’m traveling at the moment, but will retry at my destination.
Also disable the GZIP compression in ACP, if not already done. And the extensions, them all.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: 500 Errors on Cache Purge Redux

Post by shortmort37 »

No extensions! Not even a post, except for the canned “Welcome to phpBB” post. As vanilla as vanilla can be.
Post Reply

Return to “[3.3.x] Support Forum”