apache cpu over 70% on localhost

i'm running a number of WP sites on my localhost WAMP on w8. I started to work on a new site, using Sass and Zurb Foundation using this template: http://jointswp.com/.

the problem: During my work, suddenly every time I'm querying from the index page, the apache server takes up to 70% from my cpu and the page doesn't load. It happens only on this site, only on this specipic page.

This is the code from the index.php:

?php get_header(); ?
    div id="content"
        div id="inner-content" class="row clearfix"
        ?php $caruselq = new WP_Query( array( 'post_type' = 'action') );?
            ?php if ( $caruselq-have_posts() ) : while ( $caruselq-have_posts() ) :?
                ?php include get_stylesheet_directory().'/tryout.php';//carusel?
            ?php endwhile; ?
        ?php else: ?

        ?php endif;?
        div id="main" class="large-8 medium-8 columns clearfix" role="main"
                    ?php get_sidebar(); ?
                /div !-- end #inner-content --
            /div !-- end #content --
?php get_footer(); ?

and the code from tryout.php:

?php if (have_posts()) :?
  ul class="example-orbit" data-orbit data-options="slide_number:false;"
  ?php while (have_posts()) : the_post(); ?
    li
      ?php the_post_thumbnail(); ?
    div class="orbit-caption"
      ?php the_excerpt();?
    /div
    /li
      ?php endwhile;?
  /ul
?php endif;?

Here is the log from apache during the problem:

1 - - [19/Apr/2014:18:05:38 +0300] "GET /favicon.ico HTTP/1.1" 404 209
::1 - - [19/Apr/2014:18:05:40 +0300] "GET /egood/wp-admin/plugins.php HTTP/1.1" 200 43845
::1 - - [19/Apr/2014:18:05:44 +0300] "GET /egood/wp-admin/load-scripts.php?c=1load%5B%5D=hoverIntent,common,admin-bar,thickbox,plugin-install,svg-painter,heartbeat,wp-auth-check,underscore,shortcode,media-uploadver=3.9 HTTP/1.1" 200 21434
::1 - - [19/Apr/2014:18:05:49 +0300] "GET /egood/wp-admin/plugins.php?action=delete-selectedchecked%5B0%5D=akismet%2Fakismet.phpplugin_status=allpaged=1s_wpnonce=8adc278390 HTTP/1.1" 200 29629
::1 - - [19/Apr/2014:18:05:51 +0300] "GET /egood/wp-admin/load-scripts.php?c=1load%5B%5D=hoverIntent,common,admin-bar,svg-painter,heartbeat,wp-auth-check,thickbox,underscore,shortcode,media-uploadver=3.9 HTTP/1.1" 200 21188
::1 - - [19/Apr/2014:18:05:53 +0300] "POST /egood/wp-admin/plugins.php?action=delete-selectedchecked%5B0%5D=akismet%2Fakismet.phpplugin_status=allpaged=1s_wpnonce=8adc278390 HTTP/1.1" 302 -
::1 - - [19/Apr/2014:18:05:53 +0300] "GET /egood/wp-admin/plugins.php?deleted=trueplugin_status=allpaged=1s= HTTP/1.1" 200 42329
::1 - - [19/Apr/2014:18:05:54 +0300] "GET /egood/wp-content/plugins/kk-star-ratings/bhittani-framework/admin/js/colorpicker/js/colorpicker.js HTTP/1.1" 304 -
::1 - - [19/Apr/2014:18:05:54 +0300] "GET /egood/wp-content/plugins/kk-star-ratings/bhittani-framework/admin/js/lightbox.js HTTP/1.1" 304 -
::1 - - [19/Apr/2014:18:05:54 +0300] "GET /egood/wp-content/plugins/kk-star-ratings/bhittani-framework/admin/js/admin.js HTTP/1.1" 304 -
::1 - - [19/Apr/2014:18:05:54 +0300] "GET /egood/wp-content/plugins/kk-star-ratings/bhittani-framework/admin/js/script.js HTTP/1.1" 304 -
::1 - - [19/Apr/2014:18:05:54 +0300] "GET /egood/wp-admin/load-scripts.php?c=1load%5B%5D=jquery-core,jquery-migrate,utilsver=3.9 HTTP/1.1" 200 40221
::1 - - [19/Apr/2014:18:05:54 +0300] "GET /egood/wp-admin/load-scripts.php?c=1load%5B%5D=hoverIntent,common,admin-bar,thickbox,plugin-install,svg-painter,heartbeat,wp-auth-check,underscore,shortcode,media-uploadver=3.9 HTTP/1.1" 200 21434
::1 - - [19/Apr/2014:18:06:55 +0300] "POST /egood/wp-admin/admin-ajax.php HTTP/1.1" 200 47
::1 - - [19/Apr/2014:18:07:27 +0300] "GET /egood/wp-admin/plugins.php?action=deactivateplugin=jetpack%2Fjetpack.phpplugin_status=allpaged=1s_wpnonce=0cc932eb63 HTTP/1.1" 302 -
::1 - - [19/Apr/2014:18:07:28 +0300] "GET /egood/wp-admin/plugins.php?deactivate=trueplugin_status=allpaged=1s= HTTP/1.1" 200 41519
::1 - - [19/Apr/2014:18:07:46 +0300] "GET /egood/wp-admin/plugins.php?action=deactivateplugin=kk-star-ratings%2Findex.phpplugin_status=allpaged=1s_wpnonce=5d232328de HTTP/1.1" 302 -
::1 - - [19/Apr/2014:18:07:47 +0300] "GET /egood/wp-admin/plugins.php?deactivate=trueplugin_status=allpaged=1s= HTTP/1.1" 200 38436
::1 - - [19/Apr/2014:18:07:47 +0300] "GET /egood/wp-admin/load-scripts.php?c=1load%5B%5D=hoverIntent,common,admin-bar,thickbox,plugin-install,svg-painter,heartbeat,wp-auth-checkver=3.9 HTTP/1.1" 200 14928
::1 - - [19/Apr/2014:18:08:48 +0300] "POST /egood/wp-admin/admin-ajax.php HTTP/1.1" 200 47
::1 - - [19/Apr/2014:18:09:48 +0300] "POST /egood/wp-admin/admin-ajax.php HTTP/1.1" 200 47

Ive been trying to generate log file from WP by changing the WP_DEBUG and WP_DEBUG_LOG but it does not generate...

Here is MYSQL log file from today:

2014-04-19 16:43:50 7000 [Note] Plugin 'FEDERATED' is disabled.
2014-04-19 16:43:50 7000 [Note] InnoDB: The InnoDB memory heap is disabled
2014-04-19 16:43:50 7000 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-04-19 16:43:50 7000 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-04-19 16:43:50 7000 [Note] InnoDB: Not using CPU crc32 instructions
2014-04-19 16:43:50 7000 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-04-19 16:43:50 7000 [Note] InnoDB: Completed initialization of buffer pool
2014-04-19 16:43:50 7000 [Note] InnoDB: Highest supported file format is Barracuda.
2014-04-19 16:43:50 7000 [Note] InnoDB: 128 rollback segment(s) are active.
2014-04-19 16:43:50 7000 [Note] InnoDB: Waiting for purge to start
2014-04-19 16:43:50 7000 [Note] InnoDB: 5.6.12 started; log sequence number 105484389
2014-04-19 16:43:50 7000 [Note] Server hostname (bind-address): '*'; port: 3306
2014-04-19 16:43:50 7000 [Note] IPv6 is available.
2014-04-19 16:43:50 7000 [Note]   - '::' resolves to '::';
2014-04-19 16:43:50 7000 [Note] Server socket created on IP: '::'.
2014-04-19 16:43:51 7000 [Note] Event Scheduler: Loaded 0 events
2014-04-19 16:43:51 7000 [Note] wampmysqld: ready for connections.
Version: '5.6.12-log'  socket: ''  port: 3306  MySQL Community Server (GPL)

Topic sass apache fatal-error php Wordpress

Category Web


Your tryout.php has a posts loop in it, and you're calling that file inside another loop. Loops squared. I expect your content is not actually structured in this way?

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.