Cron 500 Errors

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
KungFuJosh
Registered User
Posts: 108
Joined: Sun Aug 21, 2016 1:26 am
Location: USA
Name: Joshua
Contact:

Re: Cron 500 Errors

Post by KungFuJosh »

There's nothing in any server logs referencing cron, or cron errors. Only the error_log file I mentioned above.

My hosting provider suggested it could be a corrupt phpbb install, so I reinstalled the complete package, and that made no change.

My server is setup with PHP 7.3 on LightSpeed.

The error occurs when pages are loaded.
User avatar
EA117
Registered User
Posts: 1970
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Cron 500 Errors

Post by EA117 »

What I expect that means is "my hosting provider does not make the HTTPD access log available to me", although you could confirm that point with your hosting provider to be sure. That would seem unusual, since what's more typically the case is "the HTTPD access log is the only thing I have access to", and the error logs tend to be more elusive.

We're talking about the same log where daily there would be entries of web browsers from around the country or around the world making GET requests for index.php, viewtopic.php, memberlist.php, etc., on your site. i.e. All the "normal access" of your site would be logged, both from actual users and from bots who are just crawling your site. It's in that same log where -- when phpBB periodically determines that it's time to run a ready cron task -- that you would also see one of those web browsers issuing a GET for a /cron or cron.php URL, same as they do for index.php or anything else.

So it seems like the next step is asking the hosting provider where the HTTPD access log is that will show visitors accessing index.php, cron.php or /cron URLs, etc. Once you've established access to that log, the question goes back to whether the requests shown in that log truly do not have any cron_type specified when the error gets logged, versus whether a cron_type was specified but apparently got stripped after arriving at the server.
rxu
Extensions Development Team
Posts: 3456
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Cron 500 Errors

Post by rxu »

I'm not sure, but if those errors are generated on controller pages, then the cause is probably the same as fixed here https://github.com/phpbb/phpbb/pull/5831/files
User avatar
EA117
Registered User
Posts: 1970
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Cron 500 Errors

Post by EA117 »

rxu wrote: ↑
Tue Apr 07, 2020 1:37 pm
I'm not sure, but if those errors are generated on controller pages, then the cause is probably the same as fixed here https://github.com/phpbb/phpbb/pull/5831/files
Interesting. I had hit that same garbage_collection() call closing the database out from under some additional logging I was trying to capture, and always assumed it was my logging that was out of place rather than the garbage_collection() call. 😜

Agreed that "I cannot confirm that this definitely would or would not result in the condition being discussed in this thread." But I do think maybe we can assert this: If this PHPBB3-16314 issue is involved, then what the HTTPD access log analysis is going to confirm is that there are /cron or cron.php requests arriving which never had a cron_type specified in the first place.

i.e. The premise is that the cron URL generation process failed in an unspecified manner because it needed to make further database access. But rather than reporting a fatal error, ended up generating a cron URL that simply wasn't fully formed. And that incomplete URL rendered into the page, in turn, is what leads to an error being reported when phpBB tries to process the requested cron URL.

Since the error being logged here is occurring "not when the URL is being generated", but "in response to a /cron or cron.php URL request that arrived." An assertion I'm making since the call stack is coming out of cron.php itself, and not out of some other page trying to generate its footer. Just saying all of that out loud in case you look at this and have a different idea on the interpretation.
KungFuJosh
Registered User
Posts: 108
Joined: Sun Aug 21, 2016 1:26 am
Location: USA
Name: Joshua
Contact:

Re: Cron 500 Errors

Post by KungFuJosh »

After updating to 3.3.1, the error looks like this:

Code: Select all

[11-Aug-2020 20:42:38 Europe/London] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to phpbb\controller\helper::__construct() must be an instance of phpbb\auth\auth, instance of phpbb\template\twig\twig given, called in /public_html/cache/production/container_12345.php on line 1665 and defined in /public_html/phpbb/controller/helper.php:102
Stack trace:
#0 /public_html/cache/production/container_12345.php(1665): phpbb\controller\helper->__construct(Object(phpbb\template\twig\twig), Object(phpbb\user), Object(phpbb\config\db), Object(phpbb\symfony_request), Object(phpbb\request\request), Object(phpbb\routing\helper))
#1 /public_html/cache/production/container_12345.php(3136): phpbb_cache_container->getController_HelperService()
#2 /public_html/vendor/symfony/dependency-injection/Container.php(306): phpbb_cache_container->getPaginationService()
#3 /public_html/viewtopic.php(52): Symfony\Component\Dep in /public_html/phpbb/controller/helper.php on line 102
User avatar
david63
Registered User
Posts: 18828
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Cron 500 Errors

Post by david63 »

It may be related to this bug https://tracker.phpbb.com/browse/PHPBB3-16565
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 27105
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Cron 500 Errors

Post by Paul »

KungFuJosh wrote: ↑
Tue Aug 11, 2020 8:00 pm
After updating to 3.3.1, the error looks like this:

Code: Select all

[11-Aug-2020 20:42:38 Europe/London] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to phpbb\controller\helper::__construct() must be an instance of phpbb\auth\auth, instance of phpbb\template\twig\twig given, called in /public_html/cache/production/container_12345.php on line 1665 and defined in /public_html/phpbb/controller/helper.php:102
Stack trace:
#0 /public_html/cache/production/container_12345.php(1665): phpbb\controller\helper->__construct(Object(phpbb\template\twig\twig), Object(phpbb\user), Object(phpbb\config\db), Object(phpbb\symfony_request), Object(phpbb\request\request), Object(phpbb\routing\helper))
#1 /public_html/cache/production/container_12345.php(3136): phpbb_cache_container->getController_HelperService()
#2 /public_html/vendor/symfony/dependency-injection/Container.php(306): phpbb_cache_container->getPaginationService()
#3 /public_html/viewtopic.php(52): Symfony\Component\Dep in /public_html/phpbb/controller/helper.php on line 102
Delete everything from the cache/ directory except.for index.htm and .htaccess
KungFuJosh
Registered User
Posts: 108
Joined: Sun Aug 21, 2016 1:26 am
Location: USA
Name: Joshua
Contact:

Re: Cron 500 Errors

Post by KungFuJosh »

david63 wrote: ↑
Tue Aug 11, 2020 8:33 pm
It may be related to this bug https://tracker.phpbb.com/browse/PHPBB3-16565
That seems possible. Hopefully they patch that and it fixes my issue also.
User avatar
3Di
Former Team Member
Posts: 16082
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Name: Marco
Contact:

Re: Cron 500 Errors

Post by 3Di »

I am not sure though that is related seeing the error trace you above posted, have you tried this tip first?
Paul wrote: ↑
Wed Aug 12, 2020 6:49 am
Delete everything from the cache/ directory except.for index.htm and .htaccess
Last edited by 3Di on Wed Aug 12, 2020 11:44 am, edited 1 time in total.
πŸ†“ 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. Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user ΒΊ Extensions, Scripts, MOD porting, Update/Upgrades
KungFuJosh
Registered User
Posts: 108
Joined: Sun Aug 21, 2016 1:26 am
Location: USA
Name: Joshua
Contact:

Re: Cron 500 Errors

Post by KungFuJosh »

Paul wrote: ↑
Wed Aug 12, 2020 6:49 am
Delete everything from the cache/ directory except.for index.htm and .htaccess
That was already done during the upgrade process, and has no effect. Though I did it again in case you'd ask me to, and it has no effect.
User avatar
RMcGirr83
Former Team Member
Posts: 21823
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Cron 500 Errors

Post by RMcGirr83 »

Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 27105
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Cron 500 Errors

Post by Paul »

KungFuJosh wrote: ↑
Wed Aug 12, 2020 11:40 am
david63 wrote: ↑
Tue Aug 11, 2020 8:33 pm
It may be related to this bug https://tracker.phpbb.com/browse/PHPBB3-16565
That seems possible. Hopefully they patch that and it fixes my issue also.
I highly doubt it is that bug, as you will have a error message with a circular reference in there :).

Another user had the same problem as you, and deleting the cache did fix it. Are you sure you deleted the production folder completly?
KungFuJosh
Registered User
Posts: 108
Joined: Sun Aug 21, 2016 1:26 am
Location: USA
Name: Joshua
Contact:

Re: Cron 500 Errors

Post by KungFuJosh »

Paul wrote: ↑
Wed Aug 12, 2020 12:05 pm
Another user had the same problem as you, and deleting the cache did fix it. Are you sure you deleted the production folder completly?
I permanently deleted the entire cache folder using cPanel's file explorer...then I did it again with both folders inside the cache folder. I also tried clearing the cache in the admin panel before and after. It makes no difference.
User avatar
warmweer
Jr. Extension Validator
Posts: 6149
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Cron 500 Errors

Post by warmweer »

KungFuJosh wrote: ↑
Wed Aug 12, 2020 8:22 pm
I permanently deleted the entire cache folder using cPanel's file explorer...then I did it again with both folders inside the cache folder. I also tried clearing the cache in the admin panel before and after. It makes no difference.
After deleting the entire cache folder, I presume you recreated it: did you the also copy index.htm and .htaccess? (not that this is relevant to the cron errors, but it's sort of a security risk not having those 2 files in /cache).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.
KungFuJosh
Registered User
Posts: 108
Joined: Sun Aug 21, 2016 1:26 am
Location: USA
Name: Joshua
Contact:

Re: Cron 500 Errors

Post by KungFuJosh »

warmweer wrote: ↑
Wed Aug 12, 2020 10:00 pm
KungFuJosh wrote: ↑
Wed Aug 12, 2020 8:22 pm
I permanently deleted the entire cache folder using cPanel's file explorer...then I did it again with both folders inside the cache folder. I also tried clearing the cache in the admin panel before and after. It makes no difference.
After deleting the entire cache folder, I presume you recreated it: did you the also copy index.htm and .htaccess? (not that this is relevant to the cron errors, but it's sort of a security risk not having those 2 files in /cache).
The script installer recreated it. Then I deleted it and recreated it, and copied those two files back in. No effect.

I delete the error_log regularly, currently it is 28mb repeating basically this:

Code: Select all

[09-Sep-2020 03:06:33 Europe/London] PHP Fatal error:  Uncaught Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("cron_type") to generate a URL for route "phpbb_cron_run". in /public_html/vendor/symfony/routing/Generator/UrlGenerator.php:136
Stack trace:
#0 /public_html/cache/production/url_generator.php(52): Symfony\Component\Routing\Generator\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'phpbb_cron_run', 1, Array, Array)
#1 /public_html/phpbb/routing/router.php(168): phpbb_url_generator->generate('phpbb_cron_run', Array, 1)
#2 /public_html/phpbb/routing/helper.php(148): phpbb\routing\router->generate('phpbb_cron_run', Array, 1)
#3 /public_html/phpbb/controller/helper.php(212): phpbb\routing\helper->route('phpbb_cron_run', Array, false, false, 1)
#4 /public_html/cron.php(34): phpbb\controller\helper->route('phpbb_cron_run', Array, false)
#5 {main}
  thrown in /public_html/vendor/symfony/routing/Generator/UrlGenerator.php on line 136

Thanks,
Josh
Post Reply

Return to β€œ[3.3.x] Support Forum”