• Resolved Adam

    (@dahamsta)


    Has anyone had any problems with memory leaks caused by TSF?

    I have 8 websites running TSF on a 4 core / 4GB VPS, however one of them has been eating up the RAM on the system, and after a lot of debugging I’ve isolated it to TSF on just one site. I set it up originally with default or near-default settings, however I can’t check them right this minute (because enabling it will kill the VPS in a couple of minutes), so I just wanted to check here first if anyone else had experienced the problem at some point. I’ve checked the database, permissions, etc, and it’s definitely TSF causing the problem. 6 of the other websites run the same stack of plugins, so it’s unlikely to be a conflict too, although I will look into that.

    [The plugin is disabled at the moment so there’s no point in providing a URL.]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi Adam,

    With TSF 3.2.4 being live for over three months, this is undoubtedly an edge-case to me! At first sight, I think you’ve hit a case of “the last straw that broke the camel’s back,” but let’s investigate!

    Is there anything that makes the site with the issue stand out from the rest? For example, its content is written in another language (using UTF-8 symbols), or it has a lot more traffic?

    More information would be helpful, like:

    • Which PHP version have you installed?
    • Is opcode caching enabled, and did you assign enough memory & files?
    • Is PHP installed with the mbstring extension?
    • Is PHP installed using an external PCRE library?
    • Did you open up the error log and found errors related to ‘autodescription’ there?

    Your findings are odd to me because PHP can’t leak memory using a default configuration. There is only one exception I’m aware about when using the (seemingly broken) Z-Ray extension.

    All of PHP’s user memory should be destroyed every time it hits an exit state, or after a PHP timeout has been reached. And this may lead to a conclusion: Does PHP shut down correctly, or is there a plugin or theme active that prevents it from doing so?

    To test this, try lowering PHP’s memory limit to 32MB–which is more than enough on PHP 7+–, and see if you get instant out-of-memory errors (in the footer of your site). You may also free up memory by lowering PHPs timeout to 30s, instead of 60+s many servers use.

    Ideally, every WordPress request should finish rendering the HTML in under 0.1 seconds.

    Thread Starter Adam

    (@dahamsta)

    Sincere apologies Sybre, I didn’t whitelist www.ads-software.com and the notification for your reply went into my junk folder.

    I recently reactivated TSF on the client’s website, since other plugins had been updated in the interim, however the FPM process immediately took over the server again. I waited until a quiet period and reactivated again to see if it would continue and it did clear after a few minutes. It recurred again maybe twice, and I haven’t seen it since. I’d guess it was a conflict with another plugin that just needed to work itself out.

    Thanks for your comprehensive reply, and sorry again for not coming back to you until now.

    Plugin Author Sybre Waaijer

    (@cybr)

    Thanks for the update, Adam! I’m glad everything’s OK now ??

    My last attempt to explain this would be that the upgrading process took a while; it may run in the background.

    In any case, if you still find memory issues, do let me know! It might be best to contact me privately, as this can involve investigation you may not want out in public.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP-FPM memory leak’ is closed to new replies.