Hi,

I've tried that. Its been almost 10 days but still nothing. I playing
around lightspeed & nginx because its kinda looks like web server issue. As
i see apache never drops or puts in order any requests or something so
concurrent connections sent through apache never waits and attacks directly
to the server (Like a ddos scenario) this causes memcache overload (never
seen max_connection or timeout problem) and using hardware resources,
eventually load averages goes up and memcached disconnects. After a while
(like 10 seconds to 3 minutes so far) memcached starts to connect again and
this continues.

On Thu, Jun 14, 2012 at 4:14 AM, dormando <[email protected]> wrote:

> http://code.google.com/p/memcached/wiki/Timeouts
>
> have you been through this page, yet?
>
> On Thu, 7 Jun 2012, Bahadir wrote:
>
> > Hi,
> >
> > Lately we got traffic trouble with our news site so decided to start
> > using memcache. I've read about memcached but never tried it on
> > production.
> >
> > Now i have a test page (test.php) on my localserver (Apache, Mysql
> > 5.5, Php 5.3 and memcached installed) Mysql data is about 220 MB and
> > has 400k rows total.
> >
> > Test page has a simple query that pulls 50 rows from database (about
> > 200kb)
> >
> > Sample code:
> >
> > <?php
> > global $memcache;
> > $memcache = new Memcache();
> >
> > //$memcache->flush();
> > $memcache->connect("127.0.0.1", "11211");
> >
> > $key = "10";
> >
> > $cache_result = $memcache->get($key);
> >
> > if($cache_result) {
> >     $data = $cache_result;
> >     echo "<h1>cache data</h1>";
> > } else {
> >     mysql_connect("localhost", "root", "root") or die(mysql_error());
> >     mysql_select_db("newstest");
> >     mysql_set_charset("utf8");
> >
> >     $q = mysql_query("SELECT * `news`, `categories` WHERE
> > `publish_area` LIKE 'headline' AND `published`='1' AND
> > `category_parent`=`category_id` AND `publish_date` <= '".date("Y-m-d
> > H:i:s")."' ORDER BY publish_date DESC LIMIT 0,15");
> >
> >     while($o = mysql_fetch_object($q)) {
> >         $data[] = $o;
> >     }
> >
> >     $memcache->set($key, $data);
> >     echo "<h1>mysql data</h1>";
> >
> >     mysql_close();
> > }
> >
> > foreach($data as $o) {
> >     print_r($o);
> > }
> >
> > I've used ab(Apache Benchmark) and siege to test sample code.
> >
> > First of all using memcached fixed my mysql heavy load problem also
> > web site speed up which is good but both benchmark causes same
> > problems;
> >
> > 1. Web server load average goes really high based on the time
> > benchmark runs.
> > 2. memcache connection losts on heavy especially on heavy concurrent
> > requests.
> >
> > Tried with both high and low cachesizes and maxconn
> >
> > I have check apache configuration and memcache configuration but no
> > clue.
> >
>

Reply via email to