• I’ve started getting 500 Internal Server Errors on my site. When I purge the cache, it recovers. If I disable the cache, then it does not happen. There are no errors in the log file. I suspect it could be the preload that runs every 5 minutes or so and that something goes wrong, but I don’t know what.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter vermaakpetrus

    (@vermaakpetrus)

    Oh, and it may help to mention that only the home page has this error. All other pages on the site work fine. Of course, clearing the cache or disabling the cache resolves the problem immediately.

    Plugin Contributor iSaumya

    (@isaumya)

    Can you try disabling preloader in the plugin settings and check if you are still facing the problem? As preloader is a bit resource intensive as it uses cURL.

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    (I’m running 5 sites that are exactly the same (theme, plugins, code), except with different images. On some of them, it runs ok after I simply clear the cache manually. Very bizarre error!!)

    For info, I’m on a very robust host with great cpu, memory, and SSD. I doubt it’s a resource issue.

    OK, I’ve disabled the preloader. Is there a way to only preload when I clear the cache or a page is updated or does that happen already (everything cached immediately)?

    I will keep you updated about the error now that the preloader is off.

    Plugin Contributor iSaumya

    (@isaumya)

    When you enable the preloader it will show you the option to preload purged pages: https://i.imgur.com/oJ3Oet9.jpeg

    It’s not just about the resources but also about concurrent usage. if you have a lot of things mentioned in the preloader like many sitemaps and the system is constantly using cURL to preload them in some system (based on however the server is configured) – you might face issues.

    But generally, error 500 is a fatal error so you should have some log about it in the server.

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    It’s not the preloader. We’ve just experienced another ‘500 Internal Server Error’, and it’s only on the homepage. When we disable Super Cache the homepage starts working again immediately. :'(

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    When Cache is disabled, we do not experience the 500 error at all…

    Plugin Contributor iSaumya

    (@isaumya)

    Can you please check your server’s PHP error log? Cause Error 500 should definitely throw an error which is logged. Also inside the plugin please enable the log more and in the Others tab set the Log Verbosity to HIGH.

    After that when you face error 500, check
    – The access log of the server
    – PHP error log of the server
    – Plugin’s log

    to see if you can find what’s throwing the Error 500.

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    @isaumya Ok, have done as you suggested and awaiting this to reoccur so I can provide better logs/feedback.

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    We think we have found the culprit, will wait a day to make sure, and then post here to help others.

    Plugin Contributor iSaumya

    (@isaumya)

    OK. Looking forward to seeing your findings.

    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    @isaumya We analyzed the system logs and found many of the following errors:

    mmap() failed: [12] Cannot allocate memory
    PHP Fatal error:  Out of memory (allocated 147431424) (tried to allocate 24576 bytes) in /***/***/***/** .php on line xx

    Even though 1GB was allocated, it was not being honored by the server. We resolved it by adding the RlimitMEM specification in the .htaccess file.

    The error 500 and white homepage screen stopped immediately.

    I do have a question though. If I only want the preloader to run once every 24 hours, I must enable it, copy the cron URL, disable it and add the cron URL to a schedule, right? Is it possible to add an option to specify when we want it to run on the preloader setting page?

    Thank you for creating the BEST FREE cache plugin on the market! Believe me, I’ve tested them all!! We really appreciate you!!

    Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    When you say you have 1GB memory allocated – are you taking about the RAM your server has or the amount of memory you have actually mentioned inside your php.ini file? Cause a lot of time if you have not increased the memory limit inside your PHP config the system doesn’t take that.

    Also coming to the preloader running manually. The thing is if you disable the preloader toggle then running the cron won’t help. What you can do is – enable the preloader. Disable the option that says auto preloader after puging cache. And then run the preloader via CRON when you want. I think that would work.

    Thank you for creating the BEST FREE cache plugin on the market! Believe me, I’ve tested them all!! We really appreciate you!!

    – Thank you . Please consider submitting a review. ??

    • This reply was modified 2 years, 4 months ago by iSaumya.
    Thread Starter vermaakpetrus

    (@vermaakpetrus)

    The server has 64GB but uses mem load balancer. The memory was specified in user.ini and can be seen by the system inside WordPress, Tools, Sitehealt, Server. However, the allocation to the site was only honored after the RlimitMEM in htaccess, I guess due to the mem balancer.

    Regarding the preload, the objective is to only clear the cache and create preload if a page was changed or the cache was manually cleared. Your instructions will achieve that right?

    The only improvement could be to exclude an Elementor widget from the cache. (Cache the page but not the widget). Now that would be a sweet deal! Any chance of that ever happening?

    Here is my review:
    https://prnt.sc/w0Kw-388VUnK

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘500 Internal Server Error’ is closed to new replies.