• I have encountered some issues with the WP REST API, i didn’t use it for custom code but i noticed that every time i open a page in the WP dashboard the server nearly crash for memory limit. I started debugging with the chrome developer tools to find out what would be the cause of the issue and i found out that all the calls to wp-json root takes 40s to answer back and on cPanel i see an increase of memory, CPU and I/O usage. Sometimes the calls answer back with error code 500 and “The have been a critical error in your website ecc..” in the debug.log file the error i can find are different every time but it’s always about require() functions that ran out of memory and couldn’t allocate variables and than other require() couldn’t find some WC classes. If i disable all the plugins but WC i have response time around 8s. I tried to see on another site with more plugins than mine and its response time was about 3s. I uninstalled word fence because i thought it was its fault and wp rocket too. If you need other info tell me.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Try to debug issue with help of the query monitor plugin.

    Thread Starter playearngame

    (@playearngame)

    I already used it but i couldn’t identify the source of the problem. If all the plugin are disabled the calls take 8s to load. Any idea?

    Activate all the plugins that you use then deactivate them 1 by 1 and monitor the load time and identify what causes the issue.

    I also experience this on two of my websites. They both have woocommerce installed…
    But it does not specifically happen on pages that have any woocommerce content on them. It also happens on empty pages that have 0 gutenberg blocks on them.

    @playearngame did you find any cause?

    Thread Starter playearngame

    (@playearngame)

    Hi, i resolved making a backup and changing the server i was hosted on. Same provider but different machine. Some other developers told me that they had no way to fix this problem but how i did.

    @playearngame Oke, so you didn’t find a specific plugin or cause? Did you move to a server with more resources so your site could go over the 1G limit?

    Thread Starter playearngame

    (@playearngame)

    @mluzvdb No, i didn’t find the cause. I moved to another machine with the same specifics, only more storage. I suppose it was there was some error with an update, if i’m right i updated wordpress before the problem, probably the update went through an issue with the antivirus system of the server, because it was full of error too. Now with the new machine i don’t have any major problem, just some errors with woocommerce import and export but it doesn’t affect any performance or script.

    @playearngame Oke, thanks for your reply.

    After further investigation I noticed that this is not only happening on websites with woocommerce or gutenberg. It also happens on websites that do not have gutenberg active and do not have woocommerce installed.

    The websites vary in plugins they are using.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘REST API calls use 1GB memory’ is closed to new replies.