Beste forumleden.
Helaas loop ik met mijn website tegen het probleem aan dat er teveel processes geladen worden, waardoor de website niet meer bereikbaar is.
Ik gebruik joomla en maak gebruik van een affiliatefeed component en laadt de volgende template in voor een dagaanbieding (zie code beneden).
Op de homepagina staan zo'n 100 aanbiedingen, er wordt dus 100x onderstaand template geladen.
Ligt het hieraan? dient deze geoptimaliseerd te worden ?
Op een enkele pagina zijn dat er 250 (processes).
Nu lijkt mijn server (virtual/shared) dit niet aan te kunnen.
De specs van de server zijn:
2 x Intel Xeon E5506, Nehalem 2.13Ghz Quad Core, 4.8GT/s, 4MB, 32/64 bit
48GB DDR-3 6 x Kingston 8192MB DDR-3
4 x Western Digital 1000GB, SATA II, 64MB, 7200rpm, raid edition
Tevens heb ik alle overbodige plugins in Joomla uitgezet.
Zie hieronder een screenshot van de processes:
Wie o wie kan mij helpen?
http://tinypic.com/r/wrmjo4/6
Code:
<?php // no direct access
defined('_JEXEC') or die('Restricted access');
echo '<div id="left" ><jdoc:include type="modules" name="left" style="xhtml" /></div>';
echo '<div id="com_datafeeds">';
if ( $this->where['qt'] ) {
echo $this->loadTemplate('full');
} else {
$currency=$this->where['currency_sign'];
if ($this->pagination ) {
$links= $this->pagination->getPagesLinks();
echo '<div class="pagination" id="datafeeds_top">'.$links.'</div>';
}
echo '<div class="datafeeds_clear">';
foreach ($this->dataitems as $item ) {
$product_title=$item['title'];
$product_id=$item['items_id'];
$alt=df_alt($item['title']);
#point to detailed information
$product_url=JRoute::_( $this->where['baselink']."&". make_urlencoded(array("qt"=>$product_title)));
#point to merchant
$product_ref=$item['url'];
$product_price=$item['Prijs'];
$product_image=$item['image'];
########## 5 sept
$link=JRoute::_("$baselink&" . make_urlencoded(array("qt"=>$item['title'])));
$korting=number_format(($item['Select5']-$item['Prijs'])/($item['Select5']/100),0);
print '<div class="df_3col_container">';
#logo#
print '<div class="df_3col_logo" ><a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow" ><img src="http://www.mijnwebsiteurl.nl/img/'.str_replace('; ','_',$item['feed']).'.jpg" width="190px" height="45px" alt="Dagaanbiedingen van '.$item['feed'].'" /></a></div>';
#product actieprijs#
if ($product_price > 0 ) {
print '<p class="df_3col_prijs"><a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow">'.
$currency.''.money_format('%!.2n', $product_price).
'</a></p>';
} else {
print '<p class="df_3col_prijs"><a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow">GRATIS!</a></p>';
}
#afbeelding#
print '<div class="df_3col_img" ><a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow"><img src="http://imgc.mijnwebsiteurl.nl/'.$item['feed_id'].'/'.$item['items_id'].'.jpg" width="216px" alt="'.$product_title.'" '.$this->geen_img_script.'/></a></div>';
#titel product#
print '<div class="df_3col_list_title"><h2 class="df_3col_list_title"><a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow" >'.$product_title.'</a></h2></div>';
echo '<div class="info">';
#normale prijs product#
if ($item['Select5'] > 0 ) {
echo '<div class="normaleprijs">'.$currency.''.money_format('%!.2n', $item['Select5']).'</div>';
} else {
print ' ';
}
#van voor prijs#
if ($item['Select5'] > 0 ) {
echo '<div class="normaleprijsopsomming"><ul><li>Van: <font style=" text-decoration:line-through; font-weight:bold; color:#cc0000;"> '.$currency.' '.money_format('%!.2n', $item['Select5']).'</font> voor: <font style="font-weight:bold; color:#000;"> '.
$currency.' '.money_format('%!.2n', $product_price).' </font></li></ul></div>';
} else {
print '<div class="normaleprijsopsomming"><ul ><li>Actieprijs: <font style="font-weight:bold; color:#000;">'.
$currency.' '.money_format('%!.2n', $product_price).' </font></li></ul></div> ';
}
echo ' <div align="right" style="margin:2px; float:right;"> ';
if ($item['Select5'] > 0 ) {echo '<a href="http://twitter.com/home?status='.$item['title'].'. Van '.$item['Select5'].' Voor '.$product_price.', '.$korting.'procent korting op www.mijnwebsiteurl.nl" title="Deel op Twitter" target="_blank"><img src="templates/mijnwebsiteurl/images/Twitter-icon.png" alt="Deel mijnwebsiteurl.nl op Twitter" width="18" height="18"></a></div>'; } else {
print '<a href="http://twitter.com/home?status='.$item['title'].'. Actieprijs van '.$product_price.' op www.mijnwebsiteurl.nl" title="Deel op Twitter" target="_blank"><img src="templates/mijnwebsiteurl/images/Twitter-icon.png" alt="Deel mijnwebsiteurl.nl op Twitter" width="18" height="18"></a></div>';
}
#korting#
if ($item['Select5'] > 0 ) {
echo '<div class="normaleprijsopsomming"><ul><li><font style="font-weight:bold; color:#000;"> '.$korting.'% korting </font></li></ul></div>';
} else {
print ' ';
}
#tijd verzending#
if ($item['Select6'] > 0 ) {
echo '<div class="timetoship"><ul><li><!--Verzending:--> '.$item['Select6'].'</li></ul></div>';
} else {
print ' ';
}
#aanbieder#
if ($item['Select7'] > 0 ) {
echo '<div class="aanbieder"><ul><li><!--Meer informatie op: --><a class="dflink" target="_blank" href="'.$product_url.'" rel="nofollow"> '.$item['Select7'].'</a></li></ul></div>';
} else {
print '<div class="aanbieder"><ul><li><!--Meer informatie op: --><a class="dflink" target="_blank" href="'.$product_url.'" rel="nofollow"> '.$item['feed'].'</a></li></ul></div> ';
}
#actie tot#
if ($item['Select8'] == 8) {
echo '<div class="actietijd"><ul><li>Actie geldig tot: <a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow"> 8:00 uur </a></li></ul></div>';
} else {
print ' ';
}
if ($item['Select8'] == 9) {
echo '<div class="actietijd"><ul><li>Actie geldig tot: <a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow">9:00 uur </a></li></ul></div>';
} else {
print ' ';
}
if ($item['Select8'] == 10) {
echo '<div class="actietijd"><ul><li>Actie geldig tot: <a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow">10:00 uur </a></li></ul></div>';
} else {
print ' ';
}
if ($item['Select8'] == 12 ) {
echo '<div class="actietijd"><ul><li>Actie geldig tot: <a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow">12:00 uur </a></li></ul></div>';
} else {
print ' ';
}
if ($item['Select8'] == 24 ) {
echo '<div class="actietijd"><ul><li>Actie geldig tot: <a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow">0:00 uur </a></li></ul></div>';
} else {
print ' ';
}
if ($item['Select8'] == 000) {
echo '<div class="actietijd"><ul><li>Actie geldig tot: <a class="dflink" target="_blank" href="'.$product_ref.'" rel="nofollow">0:00 uur </a></li></ul></div>';
} else {
print ' ';
}
echo '</div>';
print'</div>';
}
print '</div><div class="datafeeds_clear datafeeds_fix"> </div>';
if ($this->pagination ) {
echo '<div class="pagination" id="datafeeds_bottom">'.$links.'</div>';
}
}
echo '</div>';
1.561 views