• Resolved bosnett

    (@bosnett)


    I tried to install and configure Varnish caching via Docker on my dedicated server (Debian 11 with Plesk panel) that is running Dedicated Nginx fpm.

    After that these issues started all sudden. The REST API encountered an unexpected result (For this I know it has to do with BuddyBoss plugin) I downloaded file php file via Advanced DB Cleaner plugin but didn′t apply anything yet.

    Second issue is A scheduled event has failed (The scheduled event, wf_scan_monitor, failed to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended.)

    The website is throttling a lot. The Cron Job is not working at all. So if you are present on the website you will see content live feed and everything but if you are not Online logged on the website you wont receive any notifications via email or whatsoever.

    On Plesk server I went to Database and used the command: Check and repair there it shows me: o5qPXDWG_wfls_role_countsThe storage engine for the table doesn’t support check.

    WordPress Integrity is ok.

    Cron Events plugin in WordPress shows this:

    There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron events on your site may not work. The problem was:

    Unexpected HTTP response code: 404

    More or less that would be all my checks. Any idea how to fix this?

    • This topic was modified 1 year, 10 months ago by bosnett.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello, bosnett, & welcome. This is a pretty typical message when a location block in your configuration file doesn’t match the location that’s being sought.

    What would be helpful is telling us what url’s caused the 404, & perhaps, additionally, letting us look at your nginx.conf &/or other relevant configuration files. Please also consider looking closely at your logs, as these will inform you where the problem lies. You might find information in the nginx-error.log, but most likely it’ll actually be in the nginx.log itself. You can use Pastebin or similar to paste copies of configuration or log files you want us to look at.

    Thread Starter bosnett

    (@bosnett)

    Hello abletec.

    Thank you for answer. I have managed to fix some issues with reset of .htaccess but the website is still having issues.

    Now when I take a look at the log this is what I get:

    2023-04-17 13:30:22 Warning (MY_Mac_Adress) Got error ‘PHP message: PHP Warning: Undefined variable $actual_link in /var/www/vhosts/bosnett.com/httpdocs/wp-content/plugins/buddyboss-platform/bp-core/bp-core-functions.php on line 5993PHP message: PHP Warning: Undefined variable $actual_link in /var/www/vhosts/bosnett.com/httpdocs/wp-content/plugins/buddyboss-platform/bp-core/bp-core-functions.php on line 5994’ Apache error

    2023-04-17 13:30:21 Warning (My_IP) 19447#0: *31110 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined variable $actual_link in /var/www/vhosts/bosnett.com/httpdocs/wp-content/plugins/buddyboss-platform/bp-core/bp-core-functions.php on line 5993PHP message: PHP Warning: Undefined variable $actual_link in /var/www/vhosts/bosnett.com/httpdocs/wp-content/plugins/buddyboss-platform/bp-core/bp-core-functions.php on line 5994” while reading response header from upstreamnginx error

    Also on my website when publishing new posts it takes 15-20 seconds depends from the content of the post to publish it. I find that weird since I have optimised very well website.

    I ran on my laptop local WordPress installation and looked through installations of freshly installed BuddyBoss just to see if there is some damage inside these code but everything seems same no difference.

    So basically I am still having issues that I am unable to figure out. The website shows no errors on backend but I can see them during the use of the website because I know how it was before this error. The website is fast there is no denying in it but something is still not completely right here.

    Could it be I need to switch to different web server?

    Kind regards.

    Sam

    Hello again, Sam. I’m sorry–I thought we had a clean installation of WordPress. Obviously that’s not the case. Could you please deactivate all plugins, choose a twenty* theme, and see what errors you’re getting?

    Are you using straight PHP, or PHP-FPM? I’d definitively advise the latter. What version of PHP are you using?

    When I’m checking out problems like this, I usually also check file permissions and ownership. Those files belonging to the website should generally have permissions of 0644, while directories are usually set to 0755.

    Ownership is a bit of an issue, as there aren’t really any standards. Some people just assign them to the webserver group. I personally assign the website owner/user to the webserver group and then give that user ownership of the website files. You’ll need to look at your Nginx & PHP configuration files to ensure that these things are all set correctly, because if the webserver group is set to nobody but the files are owned by somebody, then all kinds of things are going to happen, none of which are good. Ownership needs to extend from the web root downward, as do the permissions. That means, in your case, from /var/www downward files and directories should have the permissions and ownerships suggested above.

    Make sure your user and group agree in your config files w/the ownership actually set.

    This stuff can get real complex real quick. In terms of your webserver, I personally use Nginx, but it does have a learning curve–I’m not gonna lie. For 1 thing, it doesn’t use .htaccess files, so you have to get used to not having those at your disposal. I’ve been using it for about 5 years now, & I’ve never looked back. You can get so much more mileage out of a properly configured Nginx/PHP-FPM server in terms of connection numbers it’s incredible.

    So the steps I’m suggesting now are:

    1. Let’s get a clean install of WordPress.
    2. Check your file ownership & permissions, & adapt them accordingly, changing your config files as required.

    Then please let us know where we’re at so we can make additional suggestions if needed. Have a blessed rest of your day!

    Thread Starter bosnett

    (@bosnett)

    This is what I have done so far:

    Fresh installed WordPress!
    Migrated my website. Fixed the issues or so I believe.

    After reset of .htaccess now the website is very fast, stable still the cron job most of the time works well but sometimes it shows the old message that cron is delayed (mainly because of the Litespeed cache plugin that I installed instead of WP Rocket; reasoning: free, has Object cache while WP Rocket is not free and has no Object Cache that is must have for BB platform).

    Configuration:
    Php Version 8.0.28 FPM application
    OS: Debian 11.6
    Plesk Obsidian 18.0.51
    I am currently using these settings : “Dedicated FPM application served by nginx”.
    Or should I use this one instead? “Fpm application served by nginx”.

    Server specs: AMD Ryzen 5 3600 6-Core Processor (12 core(s); 64 GB Ram; 500GB m2 nvme.

    Anyway I fixed issues. Now it′s just cron work left that I want to make sure it works as it should. It′s ok but I would like to ask you for advice.
    Since it′s community website should I use server Cron or WordPress cron job?

    By the way how can I see for sure if my WordPress API is working properly? Some easy and simple way to follow would be nice for a change!

    I have my root user that I can use via terminal and there is no limit to this account so basicaly I can edit and change all permissions on everything although there is no need for that.

    Thank you for your time and efforts.

    Wish you a nice rest of the day ??

    Kind regards.

    Sam

    Hi, Sam. First of all, if you’re not using Litespeed as a webserver, then please uninstall the Litespeed plugin.

    I’m really confused now. I thought you were using Apache. In that case, you should install Apache’s version of PHP-FPM.

    Thirdly, are your plugins working as you’d want now? You should likely use a caching plugin, but I wouldn’t do that until you know everything’s working well. Then you can put the icing on the cake & install a caching solution. I’ve seen too many cases where caching plugins made people believe that their changes hadn’t taken effect when indeed they had, so it really is 1 of the last things to do once you know everything’s in place. & when you do have to work on the site, it’s a good idea to disable it while the work is in progress.

    As for cron, generally speaking the recommendation is to disable wp-cron & instead run it via your webserver. How often you want to run it is up to you.

    Make certain you can update the site (it’s 1 of the first thing to fall over in a screaming heap when file permissions & ownerships are incorrect). If they aren’t, you’ll be asked for FTP information. Change permissions and ownership & all should be well.

    I hope we’ve been helpful, & please don’t hesitate to come back & hit us up if you ever need to.

    Your Site Health Check will generally indicate to you if things aren’t working well between your server & the WordPress API.

    Thread Starter bosnett

    (@bosnett)

    Hi Abletec.

    You were right. After removal of the litespeed caching plugin now everything works perfectly.

    Thank you very much for guidance.

    Have a lovely day.

    Samir

    Samir, this is great. Please don’t forget to mark the topic as resolved so that those viewing unresolved topics don’t think you still need help. Don’t hesitate to ask for assistance anytime. Having your own VPS is a *huge* responsibility, & I’ve seen many a person run into serious trouble because they didn’t ask for (& often didn’t really know they needed) help until their website collapsed around their ears. By then there were a whole lot of pieces to clean up.

    It was truly a pleasure working w/you. Thank you for the privilege.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘The REST API encountered an unexpected result’ is closed to new replies.