lists@truthisfreedom.org.uk
2010-Aug-03 11:16 UTC
[Puppet Users] Managing Pear and Pecl packages in Puppet
Hi all, I''m using the pear/pecl package providers from http://www.mit.edu/~marthag/puppet/ and I''ve run into a memory limit problem. I''ve tried hacking the script so that it passes additional options to pecl/pear, however these just error out about not being valid options (even though they are!). I''m now at a point where the following stanza gives the error message below: Stanza =====package{"pear": ensure => installed,provider => ''pear''; "zip": ensure => installed,provider => ''pecl''; } ===== Error =====err: //storeweb/Package[zip]/ensure: change from absent to present failed: Execution of ''/usr/bin/pecl upgrade zip'' returned 255: downloading zip-1.10.2.tgz ... Starting to download zip-1.10.2.tgz (236,912 bytes) ........................................done: 236,912 bytes Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in /usr/share/pear/PEAR/PackageFile/v2/Validator.php on line 170 ==== Can anyone help me figure out how to change the memory limit given that pear/pecl do not respect the settings in /etc/php.ini? Thanks, Matt -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
lists@truthisfreedom.org.uk
2010-Aug-03 11:50 UTC
Re: [Puppet Users] Managing Pear and Pecl packages in Puppet
Quoting Trevor Hemsley <trevor.hemsley@codefarm.com>:> When I look in my /usr/bin/pecl file I see that it is a 4 line shell > script and one of the parameters there sets the memory_limit. Did you > try hacking that?I can see where in that file I could put the options, however the whole point of us using puppet is that we don''t have to modify files or repackage software... :( The current systems are built by downloading the source from php.net and compiling by hand, then installing any pecl libraries that are required by hand. It can take us up to 6 hours to build a webserver this way! I guess that if push comes to shove I could create a manifest that pushes out a new copy of /usr/bin/pecl to the relevant place, but that''s really not a "clean" solution as far as I''m concerned! Thanks for the heads up on the file though, Matt -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Trevor Hemsley
2010-Aug-03 11:56 UTC
Re: [Puppet Users] Managing Pear and Pecl packages in Puppet
No, it''s not a clean solution but if the PECL maintainers are silly enough to hard code a memory limit in the shell script that is used to invoke it then there is not a huge amount that you can do about it. There are lots of hits on google complaining about the hard coded memory limit but not much in the way of solutions to the problem. I''d guess the real solution to problems like this is to report it upstream to the PECL maintainers - maybe suggesting that a better solution would be to have an /etc/pecl.ini and change /usr/bin/pecl to use -c /etc/pecl.ini to point it to its own php.ini that can be amended to suit site requirements. On 03/08/2010 12:50, lists@truthisfreedom.org.uk wrote:> Quoting Trevor Hemsley <trevor.hemsley@codefarm.com>: > >> When I look in my /usr/bin/pecl file I see that it is a 4 line shell >> script and one of the parameters there sets the memory_limit. Did you >> try hacking that? > I can see where in that file I could put the options, however the > whole point of us using puppet is that we don''t have to modify files > or repackage software... :( > > The current systems are built by downloading the source from php.net > and compiling by hand, then installing any pecl libraries that are > required by hand. It can take us up to 6 hours to build a webserver > this way! > > I guess that if push comes to shove I could create a manifest that > pushes out a new copy of /usr/bin/pecl to the relevant place, but > that''s really not a "clean" solution as far as I''m concerned! > > Thanks for the heads up on the file though, > > Matt >-- Trevor Hemsley Infrastructure Engineer ................................................. * C A L Y P S O * Brighton, UK OFFICE +44 (0) 1273 666 350 FAX +44 (0) 1273 666 351 ................................................. www.calypso.com This electronic-mail might contain confidential information intended only for the use by the entity named. If the reader of this message is not the intended recipient, the reader is hereby notified that any dissemination, distribution or copying is strictly prohibited. * P * /*/ Please consider the environment before printing this e-mail /*/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Matt Wallace
2010-Aug-03 12:13 UTC
Re: [Puppet Users] Managing Pear and Pecl packages in Puppet
On Tuesday 03 Aug 2010 12:56:45 Trevor Hemsley wrote:> No, it''s not a clean solution but if the PECL maintainers are silly > enough to hard code a memory limit in the shell script that is used to > invoke it then there is not a huge amount that you can do about it. > There are lots of hits on google complaining about the hard coded memory > limit but not much in the way of solutions to the problem. > > I''d guess the real solution to problems like this is to report it > upstream to the PECL maintainers - maybe suggesting that a better > solution would be to have an /etc/pecl.ini and change /usr/bin/pecl to > use -c /etc/pecl.ini to point it to its own php.ini that can be amended > to suit site requirements.Not a bad idea at all, I''ll post a bugfix now. In the mean-time, I''ve hacked the script... :( M. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Andrew Sharpe
2012-Dec-15 03:01 UTC
Re: [Puppet Users] Managing Pear and Pecl packages in Puppet
To avoid the hardcoded memory limit you can install PECL packages with # pear install pecl/<package name> Given your examples with the providers above I think your declaration might become package{ "pear": ensure => installed, provider => ''pear''; "pecl/zip": ensure => installed, provider => ''pear''; } This should use the memory limits set in php.ini and hopefully allows you to get where you want to be. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/1J_-ma8CfOUJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.