• I purchased a theme vis theme forest and ever since I installed it I have had my site go down too many times.

    After spending a lot of time investigating this I am certain that the theme is the problem. When I switch to a default wp theme, everything is fine. I used a web stress tool to hit the site a few hundred times but it crashed, I performed the same test after activating the default theme and no prblems whatsoever.

    I contacted the theme developer who is insisting it must be a plugin and not his theme.

    My question is, how does one go about trying to find a memory leak in a theme? What should I be looking for? Would it be an open database connection that hasn’t been closed?

    Any tips would be greatly appreciated.

    Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)
  • That’s a little like asking how long is a piece of string. A rogue script may not even connect to the database but simply drop into an infinite loop – consuming CPU cycles as it does. Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    resetting the plugins folder by PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    If you run all of those tests and prove that the theme crashes the site when there are absolutely no plugins running, then I don’t see how the theme dev can deny that it’s his theme at fault.

    Thread Starter s0206

    (@s0206)

    Thanks you Esmi!

    I will follow your tips and see how it goes.

    I did deactivate all the plugins and the theme, there was no problems.
    I then activated the plugins one by one whilst using the default wp theme again no problems.

    I then deactivated all the plugins but activated the theme I purchased and the problems came back.

    I will try resetting the plugins folder and investigate further.

    It might also be worth checking your site’s error logs to see if it offers any concrete clues as where the problem is.

    Thread Starter s0206

    (@s0206)

    Ok, I will do that too.

    Thanks again Esmi.

    Thread Starter s0206

    (@s0206)

    On the last day the site went down, the error log shows out of memory messages. Most of them are specific to W3 Total Cache Plugin and one is specific to the theme’s function file:

    Here is a snippet of the error log:-

    [12-Sep-2012 15:43:59] PHP Fatal error: Out of memory (allocated 2621440) (tried to allocate 142048 bytes) in /home/site-a/public_html/wp-content/themes/child-theme/functions.php on line 24

    [12-Sep-2012 15:49:59] PHP Fatal error: Out of memory (allocated 5505024) (tried to allocate 73729 bytes) in /home/site-a/public_html/wp-content/plugins/w3-total-cache/lib/W3/Cache/File.php on line 153

    Could it be that Total Cache is causing some problems?

    I’m still trying to pinpoint the problem 🙂

    I think you need to check how much PHP memory you have available. You need at least 32M to run WordPress but, if you want to install plugins or flashy themes, you should have 64M OR 128M.

    Thread Starter s0206

    (@s0206)

    I’ve just checked and it was 32M but I have increased it to 128M.

    Esmi, thank you for your help here today, it’s very much appreciated. I will continue to investigate and hopefully have this problem resolved quickly.

    Is it ok to pop back if I have a few more questions?

    🙂

    By all means but I’d suggest posting a new topic is there’s a gap of more than about 24 hours.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘theme memory leak?’ is closed to new replies.