Archive for June, 2012

PHP with Calls to ffmpeg Functions Terminate Early

If your PHP scripts die suddenly on calls to ffmpeg functions you may have:
- Built a new version of PHP without recompiling ffmpeg-php against it
- Switched to or from thread safe PHP

The solution in both cases is:

# emerge --update --newuse ffmpeg ffmpeg-php

mpm_worker and Thread-Safe PHP are Toxic to APC

Technically the reverse is true but with all the problems folks seem to be having with the threaded Apache MPM mpm_worker and the supposedly “thread safe” versions of PHP one wonders – though it is said PHP itself is thread safe but many of its add-ons (apparently APC among them) are not. I can testify to that because I’ve been running a high volume site with threads for a few months with no issues except the big one: APC works for about 5 minutes then apache starts churning out blank pages. PHP appears to segfault but who knows what’s really going on when absolutely nothing shows up in any logs.

Supposedly mpm_worker offers great memory savings but I’ve failed to see it nor the benefits it brings and I’ve also failed to see any real difference in performance – though you could chalk that up to my having lost the bytecode cache. I’ve been back on mpm_prefork for a few hours now and haven’t noticed any significant change in load, though I’ll know by tomorrow if (apparently now stable) APC is doing anything for me.

So far it’s looking like threaded apache at this stage only really has a place on ram-constrained VPSes but as far as stability and interoperability is concerned if you got it, use it baby.

UPDATE Looks like load is actually about half what it used to be at peak hours. Threading is definitely not worth losing APC, at least for me.

/bin/rm: Argument list too long

You may encounter this error when deleting all the files in a given directory:

/bin/rm: Argument list too long

This happens because you can only pass 128K of command line and environment data; doing an rm * first fills that buffer with all of the filenames in the given directory.

The solution is to feed the contents of the directory to rm one-by-one:

find ./path/ -print0 | xargs -0 rm
Return top
foxpa.ws
Online Marketing Toplist
Internet
Technology Blogs - Blog Rankings

Internet Blogs - BlogCatalog Blog Directory

Bad Karma Networks

Please Donate!


Made in Canada  •  There's a fox in the Gibson!  •  2010-12