Support » Plugin: WP Super Cache » [kodok theme] Theme creating a lot of multi-threaded php processes! HELP!

  • Hello,

    When WP super cache is enabled for caching and the ‘Use mod_rewrite to serve cache files’ is selected, does WP Super Cache run any php scripts?

    I am having the following issue:
    I m currently using the kodok theme. As soon as I enable this theme, the number of php processes shoots up! I always see 3 php process start with the STATE=Sl or STATE=R1 which means Sleep/Running and multi-threaded. All these 3 STATE=Sl/Rl processes have like ~24 threads each. I m using godaddy hosting and they are counting threads/processes as the same thing. So with these multi-threaded php processes, I m almost always over 75 processes. And I hit the 100 process limit 1000’s of things in an hour! As soon as I kill these 3 multi-threaded processes, they start up again.

    #ps aux
    admin   108213 12.5  0.1 809760 64236 ?        Sl   18:51   0:12 /usr/bin/php
    admin   108278  2.8  0.1 289000 51196 ?        S    18:51   0:02 /usr/bin/php
    admin   108279  8.1  0.1 799760 57836 ?        R1   18:51   0:07 /usr/bin/php
    admin   108287  4.7  0.1 282124 42368 ?        S    18:51   0:04 /usr/bin/php
    admin   108313  2.6  0.1 278776 40840 ?        S    18:51   0:02 /usr/bin/php
    admin   108339 14.8  0.2 812784 73044 ?        Sl   18:51   0:12 /usr/bin/php
    admin   108559  1.3  0.1 291840 51472 ?        S    18:52   0:00 /usr/bin/php
    admin   108562  4.8  0.1 298264 58624 ?        S    18:52   0:02 /usr/bin/php
    admin   108833  1.5  0.1 282880 44648 ?        S    18:52   0:00 /usr/bin/php

    Now when I change my theme to TwentyEleven (or any other theme for that matter) and kill the php processes then the process count on my server remains around 10-15 and never goes more than this (as expected!). Also, more importantly, I also DO NOT see any php processes get created which are in the Sl or Rl state!

    So what is this kodok theme doing?

    I have WP Super Cache plugin setup and currently have disabled garbage collection so that almost NO php script from the themes run! Static html pages are being served to users at the moment. Even then if I have this kodok theme enabled, it starts to create those multi-threaded php processes as soon as it is enabled. As soon as i change the theme to something else, no multi-threaded processes get created. I am not too familiar with WP programming but I am sure anyone with WP programming experience can pin point what php scripts may get run when only static html pages are being served to user using WP super cache.

    I hope someone can help me with this issue. Thanks a lot for any input guys.

Viewing 3 replies - 1 through 3 (of 3 total)
  • 1- let the WP Super Cache build cache with the kodok theme enabled
    2- then change the theme to something else
    3- Users are a still served the cached kodok theme but the currently active theme is something else.

    By following these steps, the multi-threaded php process do not get created and my process counts remains below 20!

    I m sure this is a big clue since what does the theme do or which WP core functions run when this kodok theme is enabled BUT when all pages are served thru the cache???

    Plugin Author Donncha O Caoimh


    You should use the debug log in the plugin and check what URLs are loaded. Maybe that theme is sending an AJAX request for data. That request wouldn’t be cached and would result in many PHP processes running.

    How to know if a theme makes AJAX requests? Pls help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[kodok theme] Theme creating a lot of multi-threaded php processes! HELP!’ is closed to new replies.