Many Pages not loading anymore when accessed as a Guest - UNA 13.1.0-RC1

Hello UNA Team,

@Alex T⚜️ @Leonid S

I have different sites running the latest UNA on a dedicated server with PHP 8.2 and everything was working fine till I have started getting the following errors when trying to visit some pages as a Guest (Unauthenticated user):

  • This page can't be reached
  • This page isn’t working... unable to handle this request.HTTP ERROR 500
  • 504 Gateway Timeout error etc

I am having those errors on pages like:

www.site[dot]com/view-persons-profile/xxxxxx

www.site[dot]com/persons-home

I can't tell exactly when this problem started, whether it's before or after updating to UNA 13.1.0-RC1.

The cPanel error log doesn't show any anything but the UNA /logs/bx_profiler.log has the following message:

Oct 13 14:57:28 [0] /view-persons-profile/xxxxxx
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2023-10-13 14:57:28 LONG PAGE OPEN: 667.4479 sec
User role: guest
Request method: GET
Query string: _q=view-persons-profile/xxxxxx
Request URI: /view-persons-profile/xxxxxx
Script name: /r.php
PHP self: /r.php

Please note that I'm having this problem with the Guest (Unauthenticated) Level only. When logged in as an Admin, those pages are loading and working just fine.

I have already contacted the Hosting Company, they have checked my server and they couldn't find anything from the server side. They said that the problem is in my script and I should contact the script vendor.

Please help!

Thanks.

  • 783
  • More
Replies (10)
    • Hello @OneEagle !

      As you have the following problem (This page isn’t working... unable to handle this request. HTTP ERROR 500) - could you please check the latest lines in your server's error log file?

      • Dear @Leonid S and @Alex T⚜️

        As I've already mentioned in my post, there is nothing about this issue in the cPanel error log file. But after desperately trying to find a solution to the problem, I came across many proxy_fcgi:errors and Failed to read FastCGI header errors in the /var/log/apache2/error_log file as shown below.

        /var/log/apache2/error_log

        [Fri Oct 06 06:42:45.204619 2023] [proxy_fcgi:error] [pid 2195:tid xxxxxxxxxxxxxx] (70007)The timeout specified has expired: [remote xxx.xx.xx.xx:xxxxx] AH01075: Error dispatching request to : (polling), referer: https://www[dot]site[dot]com/view-persons-profile/xxxxx
        [Wed Oct 11 12:05:09.841770 2023] [proxy_fcgi:error] [pid 3750:tid xxxxxxxxxxxxxx] (70007)The timeout specified has expired: [remote xxx.xx.xx.xx:xxxxx] AH01075: Error dispatching request to : (polling), referer: https://www[dot]site[dot]com/view-persons-profile
        [Thu Oct 12 10:00:14.429856 2023] [proxy_fcgi:error] [pid 25266:tid xxxxxxxxxxxxxx] [remote xxx.xx.xx.xx:xxxxx] AH01067: Failed to read FastCGI header, referer: https://www[dot]site[dot]com/persons-home
        [Mon Oct 16 21:09:39.470971 2023] [proxy_fcgi:error] [pid 27606:tid xxxxxxxxxxxxxx] (70007)The timeout specified has expired: [remote xxx.xx.xx.xx:xxxxx] AH01075: Error dispatching request to : (polling), referer: https://www[dot]site[dot]com/persons-home
        [Tue Oct 17 00:56:11.852494 2023] [proxy_fcgi:error] [pid 27607:tid xxxxxxxxxxxxxx] [client xxx.xx.xx.xx:xxxxx] AH01071: Got error 'Primary script unknown' referer: https://www[dot]site[dot]com/

        Please help!

        Thanks

        • For the know cases I may suggest that smth isn't fine with the Apache + FastCGI cooperation. Some ways to fix in similar cases look like:

          set the following line in php-fpm configuration file:

          request_terminate_timeout = 300s
          
          • I am currently experiencing the same problem, but only on the new 'Group Feed' page I created.

            • This page isn’t working... unable to handle this request. HTTP ERROR 500

            Just want to know from OneEagle if the fix given by LeonidS worked and if I can go ahead and apply it.

            This happened after I upgraded to 13.1.0-RC1

            • Hello @Chris Andre Buys !

              It seems you have a different reason of your problem. BTW - what do you see in the latest lines of your error log file?

              • Hi y'all,

                I truly apologize for the late reply due to personal reasons.

                @LeonidS and @Alex T⚜️, please help as I am completely lost with this issue.

                Dear LeonidS, as per your suggestion I tried to add the following line in my PHP-FPM configuration file:

                request_terminate_timeout = 300s

                Unfortunately, it didn’t work.

                I have tried it without success in both PHP-FPM Configuration file globally and on a per-php version basis:

                /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml

                /opt/cpanel/ea-php82/root/etc/php-fpm.conf

                When I tried to rebuild the PHP-FPM configuration file and to restart the PHP-FPM service for Apache, it gave me the following message:

                Error: unknown entry 'request_terminate_timeout'
                Service Error
                (XID jm79b8) The “apache_php_fpm” service failed to restart because the restart script exited with an error.

                I think that it’s due to the fact that the 'request_terminate_timeout parameter is meant for Nginx, not for Apache, right? Please correct me if I am wrong.

                I am running Apache on Linux CentOs 7 (Dedicated server). PHP 8.2

                Then I contacted my Web Hosting provider to add the request_terminate_timeout = 300s line in my PHP-FPM configuration file. Instead, they went to my WHM > MultiPHP Manager > System Php-FPM settings (even in a user domain settings) and increased the value of PHP-FPM Pool options:

                Max Children to 50 (Default is: 5)
                Process Idle Timeout to 300 (Default is: 10)

                Unfortunately, that didn’t fix my problem.

                I have even tried to increase the Max Requests In the same PHP-FPM Pool options.

                Max Requests to 100 (Default is: 20)

                But the problem still occurs, So I reset all the PHP-FPM Pool options to their default value.

                I have requested my Web Hosting Provider to investigate the problem. My case was escalated to Level 2, then Level 3 Support (Linux System Administrators/Experts)

                They all keep on blaming UNA for non-optimized code as UNA is hitting server resources limit. That results in the failure of the server (Server overload and crashes: 500 Internal Server error, 504 Gateway Timeout error etc.) Sometimes, the server even fails to load the cPanel and the WHM page. What was found is: UNA creates long running php processes and has a high CPU and Memory usage.

                Sometimes, I get something like:

                CPU Usage: 116.4% (warning)
                MEM Usage: 42.2% (warning)
                Processes: 25 (warning)

                That’s insane!

                The Level 2 and Level 3 Support Administrators of my Web Hosting Provider suggested me to contact the script vendor/developer for code analysis and optimization.

                I have few UNA installations on the server (about 5 or 6 of them). Most of them are my test/dev sites with no members, no traffic. I just can’t understand how and why they do cause excessive server resource usage. The weird part is that it’s on a Dedicated server.

                As I have already mentioned in my original post above, some of my pages are failing to load, resulting in errors like:

                • This page can't be reached
                • This page isn’t working... unable to handle this request.HTTP ERROR 500
                • 504 Gateway Timeout error etc

                I have these errors on pages like:

                www.site[dot]com/view-persons-profile/xxxxxx

                www.site[dot]com/persons-home 

                www.site[dot]com/organizations-home 

                This problem only occurs when someone visits those pages as a guest (Unauthenticated user). When logged in, there is no problem at all. They work and load just normally.

                By the way, I have started to notice this issue after updating all my sites to UNA 13.1.0-RC1. Before that, everything was working fine. I don’t know whether some new stuffs were introduced to this release causing those pages to fail to load (crash) when not logged in.

                Please help!

                Thanks

                • Also in my PHP Errors log:

                  /home/username_here/logs/xxxxxxx_com.php.error.log 

                  I have multiple PHP Deprecated errors as I reported in my other post https://una.io/d/multiple-php-deprecated-and-fatal-errors and these PHP Fatal errors (Allowed memory size issue):

                  [06-Nov-2023 12:53:54 UTC] PHP Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 118784 bytes) in /home/xxxxxxx/public_html/modules/boonex/profiler/classes/BxProfiler.php on line 200

                  [06-Nov-2023 12:54:36 UTC] PHP Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 65536 bytes) in /home/xxxxxxx/public_html/inc/utils.inc.php on line 824

                  [06-Nov-2023 12:59:17 UTC] PHP Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 32768 bytes) in /home/xxxxxxx/public_html/inc/classes/BxDolLogs.php on line 1

                  Please help!

                  Thanks

                  • @OneEagle could you please provide whm root server access via PM and steps how to reproduce the problem ?

                    • Thanks Alex. I have sent you my server and UNA credentials: via PM.

                      • Problem fixed in UNA 13.1.0-RC3 update. https://github.com/unaio/una/issues/4546

                        Special thanks to @Alex T⚜️ who investigated the issue on my UNA site and my server and discovered the bug in UNA. Thanks to @LeonidS and @Anton L for the support and the fix. You guys are amazing! 😊

                        Login or Join to comment.