<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Transition Technology: Ticket #881: Site on ParrotServer with a memory leak?</title>
    <link>http://localhost:8080/trac/ticket/881</link>
    <description>&lt;p&gt;
It appears a site, or application, on &lt;a class="wiki" href="http://localhost:8080/trac/wiki/ParrotServer"&gt;ParrotServer&lt;/a&gt; might have a memory leak.
&lt;/p&gt;
&lt;p&gt;
&lt;a style="padding:0; border:none" href="http://localhost:8080/trac/attachment/ticket/881/parrot-memory-pinpoint-1411038915-1445598915.png"&gt;&lt;img src="http://localhost:8080/trac/raw-attachment/ticket/881/parrot-memory-pinpoint-1411038915-1445598915.png" /&gt;&lt;/a&gt;
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>Transition Technology</title>
      <url>/trac/chrome/site/TransitionNetwork-Logo-Web-Small.jpg</url>
      <link>http://localhost:8080/trac/ticket/881</link>
    </image>
    <generator>Trac 0.12.5</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 23 Oct 2015 11:19:42 GMT</pubDate>
      <title>attachment set</title>
      <link>http://localhost:8080/trac/ticket/881</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;attachment&lt;/strong&gt;
                set to &lt;em&gt;memory-pinpoint=1411038915,1445598915.png&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 23 Oct 2015 11:21:51 GMT</pubDate>
      <title>attachment set</title>
      <link>http://localhost:8080/trac/ticket/881</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;attachment&lt;/strong&gt;
                set to &lt;em&gt;parrot-memory-pinpoint-1411038915-1445598915.png&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 23 Oct 2015 11:22:56 GMT</pubDate>
      <title>status, description changed</title>
      <link>http://localhost:8080/trac/ticket/881#comment:1</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;accepted&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/trac/ticket/881?action=diff&amp;amp;version=1"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>sam</dc:creator>

      <pubDate>Fri, 23 Oct 2015 11:35:08 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/881#comment:4</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881#comment:4</guid>
      <description>
        &lt;pre class="wiki"&gt;Hi Chris
Are you able to pinpoint when it started? I guess it's some plugin I have
installed on the cop21 or dev sites.
I'll disable a bunch of plugins and see if that fixes it, then re-enable
them one by one.
I see that Apache use has risen dramatically today too:
https://penguin.transitionnetwork.org/munin/transitionnetwork.org/parrot.transitionnetwork.org/
Thanks
Sam
On 23 October 2015 at 12:22, Transition Technology Trac &amp;lt;
trac@tech.transitionnetwork.org&amp;gt; wrote:
&amp;gt; #881: Site on ParrotServer with a memory leak?
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt;            Reporter:  chris          |                      Owner:  chris
&amp;gt;                Type:  maintenance    |                     Status:
&amp;gt;            Priority:  major          |  accepted
&amp;gt;           Component:  Parrot server  |                  Milestone:
&amp;gt;            Keywords:                 |  Maintenance
&amp;gt; Add Hours to Ticket:  0              |                 Resolution:
&amp;gt;         Total Hours:  0              |  Estimated Number of Hours:  0.0
&amp;gt;                                      |                  Billable?:  1
&amp;gt; -------------------------------------+-------------------------------------
&amp;gt; Changes (by chris):
&amp;gt;
&amp;gt;  * status:  new =&amp;gt; accepted
&amp;gt;
&amp;gt;
&amp;gt; Old description:
&amp;gt;
&amp;gt; &amp;gt; It appears a site on ParrotServer might have a memory leak.
&amp;gt;
&amp;gt; New description:
&amp;gt;
&amp;gt;  It appears a site, or application, on ParrotServer might have a memory
&amp;gt;  leak.
&amp;gt;
&amp;gt;  [[Image(parrot-memory-pinpoint-1411038915-1445598915.png)]]
&amp;gt;
&amp;gt; --
&amp;gt;
&amp;gt; --
&amp;gt; Ticket URL: &amp;lt;https://tech.transitionnetwork.org/trac/ticket/881#comment:1&amp;gt;
&amp;gt; Transition Technology &amp;lt;https://tech.transitionnetwork.org/trac&amp;gt;
&amp;gt; Support and issues tracking for the Transition Network Web Project.
&amp;gt;
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 23 Oct 2015 11:49:56 GMT</pubDate>
      <title>attachment set</title>
      <link>http://localhost:8080/trac/ticket/881</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;attachment&lt;/strong&gt;
                set to &lt;em&gt;multips_memory-pinpoint-1411040716-1445600716.png&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 23 Oct 2015 11:52:14 GMT</pubDate>
      <title>attachment set</title>
      <link>http://localhost:8080/trac/ticket/881</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;attachment&lt;/strong&gt;
                set to &lt;em&gt;memory-pinpoint-1439680515-1446203715.png&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 23 Oct 2015 11:56:59 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/881#comment:5</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881#comment:5</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.15&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.15&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Looks like it started in August:
&lt;/p&gt;
&lt;p&gt;
&lt;a style="padding:0; border:none" href="http://localhost:8080/trac/attachment/ticket/881/multips_memory-pinpoint-1411040716-1445600716.png"&gt;&lt;img src="http://localhost:8080/trac/raw-attachment/ticket/881/multips_memory-pinpoint-1411040716-1445600716.png" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The first of the last two memory usage spikes started on Tuesday 1st September, and the last one on Tuesday 13th October, does that ring a bell?
&lt;/p&gt;
&lt;p&gt;
&lt;a style="padding:0; border:none" href="http://localhost:8080/trac/attachment/ticket/881/memory-pinpoint-1439680515-1446203715.png"&gt;&lt;img src="http://localhost:8080/trac/raw-attachment/ticket/881/memory-pinpoint-1439680515-1446203715.png" /&gt;&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 23 Oct 2015 12:02:24 GMT</pubDate>
      <title>attachment set</title>
      <link>http://localhost:8080/trac/ticket/881</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;attachment&lt;/strong&gt;
                set to &lt;em&gt;swap-pinpoint-1411041656-1445601656.png&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 23 Oct 2015 12:14:59 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/881#comment:6</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881#comment:6</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.1&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.15&lt;/em&gt; to &lt;em&gt;0.25&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The memory usage is causing it to swap more:
&lt;/p&gt;
&lt;p&gt;
&lt;a style="padding:0; border:none" href="http://localhost:8080/trac/attachment/ticket/881/swap-pinpoint-1411041656-1445601656.png"&gt;&lt;img src="http://localhost:8080/trac/raw-attachment/ticket/881/swap-pinpoint-1411041656-1445601656.png" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
These are the bandwidth stats:
&lt;/p&gt;
&lt;pre class="wiki"&gt; parrot  /  monthly
       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Nov '14     59.22 GiB |    4.31 GiB |   63.54 GiB |  205.63 kbit/s
      Dec '14     50.64 GiB |    3.78 GiB |   54.42 GiB |  170.46 kbit/s
      Jan '15     55.43 GiB |    4.16 GiB |   59.59 GiB |  186.64 kbit/s
      Feb '15     50.01 GiB |    3.50 GiB |   53.51 GiB |  185.55 kbit/s
      Mar '15     59.65 GiB |    4.27 GiB |   63.92 GiB |  200.20 kbit/s
      Apr '15     54.71 GiB |    3.97 GiB |   58.68 GiB |  189.91 kbit/s
      May '15     94.76 GiB |   13.97 GiB |  108.73 GiB |  340.55 kbit/s
      Jun '15     86.88 GiB |   12.03 GiB |   98.92 GiB |  320.13 kbit/s
      Jul '15     57.50 GiB |    4.59 GiB |   62.09 GiB |  194.46 kbit/s
      Aug '15     62.12 GiB |    5.65 GiB |   67.77 GiB |  212.25 kbit/s
      Sep '15     72.12 GiB |    6.98 GiB |   79.10 GiB |  256.00 kbit/s
      Oct '15     57.61 GiB |    4.65 GiB |   62.25 GiB |  281.35 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated     83.12 GiB |    6.70 GiB |   89.83 GiB |
&lt;/pre&gt;&lt;p&gt;
Nothing unsual there though note it is over the data transfer/month allowance for the server of 60GB, last month it was &lt;a class="ext-link" href="https://www.unitjuggler.com/convert-memory-from-GiB-to-GB.html?val=79.1"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;84.9GB&lt;/a&gt;, Dec 2014 and Feb 2015 have been the only two months in the last year when it has been under.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Sat, 24 Oct 2015 12:34:18 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/881#comment:7</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/881#comment:7</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.25&lt;/em&gt; to &lt;em&gt;0.75&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
The brute force attempts could well be related since the increase in memory usage appears to be directly related to the number of apache processes, see &lt;a class="new ticket" href="http://localhost:8080/trac/ticket/871" title="maintenance: Brute Force Attacks Against WordPress Sites (new)"&gt;ticket:871&lt;/a&gt;, also on another server I have seen massive loads from huge number of POSTs to &lt;tt&gt;/xmlrpc.php&lt;/tt&gt;, so I have written a little script to quantify this, &lt;tt&gt;/usr/local/bin/wp-xmlrpc-abuse&lt;/tt&gt;:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;span class="c"&gt;#!/bin/bash
&lt;/span&gt;
&lt;span class="nv"&gt;LOG_LINES&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"1000"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"IP addresses accessing xmlrpc.php more than twice for the last $LOG_LINES lines of each access.log:"&lt;/span&gt;
tail  -n &lt;span class="nv"&gt;$LOG_LINES&lt;/span&gt; /home/*/logs/access.log | grep &lt;span class="s2"&gt;"POST"&lt;/span&gt; | grep  &lt;span class="s2"&gt;"xmlrpc.php"&lt;/span&gt; | awk &lt;span class="s1"&gt;'{ print $1 }'&lt;/span&gt; | uniq -cd | rev | sort | rev
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
Running it and omitting the IP addresses that have only made 2 requests we have the following results (note each line represents on &lt;a class="wiki" href="http://localhost:8080/trac/wiki/WordPress"&gt;WordPress&lt;/a&gt; site)
&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;wp-xmlrpc-abuse
IP addresses accessing xmlrpc.php more than twice &lt;span class="k"&gt;for &lt;/span&gt;the last 1000 lines of each access.log:
      2 193.19.119.173
     13 193.19.119.173
    374 193.19.119.173
      6 193.19.119.173
     47 193.19.119.173
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
This is &lt;a class="ext-link" href="http://193.19.119.173.ipaddress.com/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;an IP address in Russia&lt;/a&gt;, I have blocked it using the &lt;tt&gt;ipdrop&lt;/tt&gt; script:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;ipdrop 193.19.119.173
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
Over the last month there have been 46k hits on &lt;tt&gt;/xmlrpc.php&lt;/tt&gt;:
&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre&gt;grep &lt;span class="s2"&gt;"xmlrpc.php"&lt;/span&gt; /home/*/logs/*access* | wc -l
46149
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
This plugin looks like a sensible option:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://wordpress.org/plugins/stop-xmlrpc-attack/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://wordpress.org/plugins/stop-xmlrpc-attack/&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
I could install it on all the WP sites on the server?
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>