<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1050088" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1050088</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Personally, I&#039;d probably just</title>
    <link>https://www.webmaster-forums.net/server-management/php-5-php-fpm-memory-leak#comment-1267925</link>
    <description> &lt;p&gt;Personally, I&#039;d probably just do the above, and forget about the issue, but it may also be that the ten child processes really do end up consuming that much RAM if they are all required. You could try a &#039;dynamic&#039; handling of child processes rather than the static one you have, say.&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Aug 2011 10:54:46 +0000</pubDate>
 <dc:creator>ninabillian</dc:creator>
 <guid isPermaLink="false">comment 1267925 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Despite the fact that the</title>
    <link>https://www.webmaster-forums.net/server-management/php-5-php-fpm-memory-leak#comment-1267735</link>
    <description> &lt;p&gt;Despite the fact that the process killer is being engaged when this type of problem happens, if I log in my server with regular SSH and check it with htop, it doesn&#039;t look like I&#039;m out of memory at all.&lt;/p&gt;
 </description>
     <pubDate>Tue, 02 Aug 2011 13:04:16 +0000</pubDate>
 <dc:creator>SEO Company</dc:creator>
 <guid isPermaLink="false">comment 1267735 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I was wrong. Memory use keeps</title>
    <link>https://www.webmaster-forums.net/server-management/php-5-php-fpm-memory-leak#comment-1267362</link>
    <description> &lt;p&gt;I was wrong. Memory use keeps climbing... just a bit more slowly. It&#039;s up to 747 now. I&#039;ll probably try shaggy&#039;s idea soon but want to see how high it will go first.&lt;/p&gt;
 </description>
     <pubDate>Sat, 23 Jul 2011 23:49:25 +0000</pubDate>
 <dc:creator>aharown07</dc:creator>
 <guid isPermaLink="false">comment 1267362 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Update on this:
As an</title>
    <link>https://www.webmaster-forums.net/server-management/php-5-php-fpm-memory-leak#comment-1267199</link>
    <description> &lt;p&gt;Update on this:&lt;br /&gt;
As an experiment, I upgraded to a larger Linode (from the 768 to a 1024). I really just wanted to see how high the RAM use would go and it was the easiest way to find out.&lt;br /&gt;
So here&#039;s the weird part: after 11 days of uptime and pretty average traffic, the used RAM never exceeds 600. Sitting at 594 right now.&lt;br /&gt;
Before, on the 768, it would exceed 600 in about 5 days and start swapping a bit.&lt;/p&gt;
&lt;p&gt;So... I wonder why:&lt;br /&gt;
1. Having more RAM results in &lt;em&gt;using &lt;/em&gt;less RAM&lt;br /&gt;
2. Or, if that&#039;s not what&#039;s happening, why it would eat up RAM so much more slowy. It may be that it&#039;s going to keep climbing but just do it really slow. At this rate, I&#039;d guess it would have to be a few weeks yet before it starts get high enough for the swap to get busy.&lt;/p&gt;
 </description>
     <pubDate>Tue, 19 Jul 2011 21:30:34 +0000</pubDate>
 <dc:creator>aharown07</dc:creator>
 <guid isPermaLink="false">comment 1267199 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>What may be happening is PHP</title>
    <link>https://www.webmaster-forums.net/server-management/php-5-php-fpm-memory-leak#comment-1265507</link>
    <description> &lt;p&gt;What may be happening is PHP is legitimately using that amount of RAM (or at least, what it would &lt;em&gt;call&lt;/em&gt; legitimately), then theoretically it should max out at whatever magical amount of RAM it wants to use.&lt;/p&gt;
&lt;p&gt;The problem being the amount of RAM in your VPS is less than the magical figure PHP wants to use. Shaggy&#039;s advice is (as usual) really good; you could follow that or see if decreasing the &lt;code&gt;max_children&lt;/code&gt; means each child is able to hit that magical amount of RAM.&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 May 2011 21:10:52 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1265507 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Thanks for that. I&#039;ll be a</title>
    <link>https://www.webmaster-forums.net/server-management/php-5-php-fpm-memory-leak#comment-1265506</link>
    <description> &lt;p&gt;Thanks for that. I&#039;ll be a while digesting it. I&#039;m extremely green to sever admin.&lt;br /&gt;
But I think I get the basic concept.&lt;/p&gt;
&lt;p&gt;I could sort of choke down how much memory php uses in threads, but then it may be that we really need that much memory so... result could be noticeable performance issues.&lt;/p&gt;
&lt;p&gt;One thing I haven&#039;t checked yet is to see if the memory eating peaks at some point. That is, when it starts swapping, I haven&#039;t let it keep going to see how bad it gets. Maybe next week. I&#039;m guessing if it peaks somewhere then levels off, we&#039;re probably fine. No tweaking needed, really. But if memory keeps climbing and we start seriously swap thrashing... then I either need more RAM or php config changes, or fix some of my overly hungry queries?&lt;/p&gt;
&lt;p&gt;(One thing I&#039;m not clear on is relationship between slow/nonindexed mysql queries and php memory consumption... maybe someone can give me the &quot;for dummies&quot; version?)&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 May 2011 19:49:27 +0000</pubDate>
 <dc:creator>aharown07</dc:creator>
 <guid isPermaLink="false">comment 1265506 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>You may have, and the chance</title>
    <link>https://www.webmaster-forums.net/server-management/php-5-php-fpm-memory-leak#comment-1265460</link>
    <description> &lt;p&gt;You may have, and the chance just goes up as you add php modules.  The easiest way to deal with the situation would be to have fpm restart the child processes after &quot;x&quot; number of requests, to keep their memory footprint artifically &#039;clean&#039;:&lt;/p&gt;
&lt;p&gt;Sounds like:&lt;br /&gt;
pm.max_requests = 50 # or some other number you deem appropriate&lt;br /&gt;
from the documentation&lt;/p&gt;
&lt;p&gt;Personally, I&#039;d probably just do the above, and forget about the issue, but it may also be that the ten child processes really do end up consuming that much RAM if they are all required.  You could try a &#039;dynamic&#039; handling of child processes rather than the static one you have, say:&lt;/p&gt;
&lt;p&gt;pm = dynamic&lt;br /&gt;
pm.max_children = 10&lt;br /&gt;
pm.start_servers = 2&lt;br /&gt;
pm.max_spare_servers = 2&lt;/p&gt;
&lt;p&gt;This way, you&#039;ll see your heavy swapping when you need it, and it will go away when you don&#039;t.  You&#039;ll see a slight penalty in performance when children aren&#039;t available to handle requests - they take a blink or two to start up.&lt;/p&gt;
&lt;p&gt;Oh PHP, when will you and your associated libraries ever become thread safe?&lt;/p&gt;
 </description>
     <pubDate>Thu, 26 May 2011 19:12:48 +0000</pubDate>
 <dc:creator>Shaggy</dc:creator>
 <guid isPermaLink="false">comment 1265460 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>(Fortunately, restarting php</title>
    <link>https://www.webmaster-forums.net/server-management/php-5-php-fpm-memory-leak#comment-1265454</link>
    <description> &lt;p&gt;(Fortunately, restarting php takes only a few seconds and is probably nothing more than a single slow page load for users)&lt;/p&gt;
 </description>
     <pubDate>Thu, 26 May 2011 15:42:19 +0000</pubDate>
 <dc:creator>aharown07</dc:creator>
 <guid isPermaLink="false">comment 1265454 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
