4,429 reputation
1723
bio website BlackMesh.com
location
age
visits member for 4 years, 4 months
seen yesterday

Director of Emerging Technology at BlackMesh Managed Hosting, longtime Linux aficionado, sometime Drupal developer (and d.o sysadmin), and occasional filesystem tinkerer.


Nov
22
comment How to troubleshoot performance issues of PHP, MySQL and generic I/O
apc.shm_size is quite small for any significant amount of WordPress code and plugins. Grab a copy of apc.php (git.php.net/?p=pecl/caching/…), throw it in your DocRoot, and check the cache full count. If it's > 0, which it will be, increase shm_size. A good guess for a typical WordPress site might be 64 or 96 MB (corresponding to apc.shm_size=64M or apc.shm_size=96M in your apc.ini). Oh, and delete apc.php when you're done; it's not a real problem, but it ideally shouldn't just be left sitting around.
Nov
22
comment Optimal setup for bulk CSV import
On MySQL 5.5 or newer (or 5.1 with InnoDB Plugin), InnoDB is pretty much always better. On 5.6 or newer, it's truly always better. MyISAM is old and broken. Don't use it unless you truly must. Anyone saying otherwise is either going off of old information, has misconfigured (or not configured) their InnoDB tunables, or is a wizard.
Oct
15
comment SSL Connect timing out during handshake (client exchange re-transmission)
Looks like the ACK isn't hitting the client. Is this an especially noisy, lossy, or slow connection? Again, the raw data is what is really needed here.
Oct
14
comment SSL Connect timing out during handshake (client exchange re-transmission)
TCP-level ACK, or layer 7 ACK? The raw data would be much more useful here.
Sep
26
comment Dangers to giving Apache user a shell
Killing mod_evasive is certainly one option to solve the problem, yes. Whether that's an appropriate answer has far more to do with why you chose to install it in the first place than its intrinsic worth, however. As far as the Apache user, giving it a shell is a minimal increase in privilege; that doesn't concern me. Apache with sudo access is scary, but largely because giving anything sudo is terrifying. Still, as long as you define your sudo narrowly (i.e., not just NOPASSWD: /usr/sbin/iptables), you should be okay in most real-world scenarios. Don't expect to pass a sec. audit, though.
Sep
17
comment passenger apache and nginx module not compiling on ubuntu 12.04LTS
Try editing the rake invocation in the passenger-install-apache2-module script to add the -v flag, which should give you a bit more output. Alternately, grab the g++ line from ps and run that by hand in the appropriate directory. What do you get?
Sep
5
comment passenger apache and nginx module not compiling on ubuntu 12.04LTS
Something like strace output is the ultimate way to track down what's actually going on inside of this, but let's stick with something simpler for now. Log on another time in a separate terminal and share with us the output of ps xfawww while the other terminal appears "stuck"; this will show us what command(s) are being run that are taking so long to complete. Alternatively (or additionally), if passenger-install-apache2-module is a shell script, try bash -x passenger-install-apache2-module.
Aug
26
comment newer libmysqlclient.so creates a conflicts with a php-mysql install
Good distributions of MySQL packages include several versions of the MySQL client libraries; I know under IUS, for example, I can simply do yum install mysqlclient16. Is there a compelling reason that you must use the Oracle-provided packages? They're widely considered inferior, and not just because of their boneheaded insistence on capitalization.
Aug
26
comment Recover lost POST data on LAMP site
Indeed. The issue here is that POST data is not part of the request, per se. It's simple stream IO on STDIN for the process being launched (e.g. PHP as in this case, or a CGI script). Thus, you can't simply modify your LogFomat to pick it up; you have to do the in-process moral equivalent of tee. Point being, the data is not only gone, it would also have been rather hard to collect in the first place.
Aug
26
comment Avoiding Nagios commands.cfg
Yep! I'd add that you can also do $USER1$/footest $ARG1$ if you don't have a reasonable ability to guess what parameters might be required; you can then use a check_command like footest!-b something -c something.
Aug
26
comment PHP Files being cached by unknown entity
Consider disabling any other accelerators or code-encryption providers, such as Zend or Ioncube. Also, as a debugging step, add an echo above the code that is erroring out, just in case you're not quite running the code you think you are.
Aug
8
comment PHP Files being cached by unknown entity
It sounds like a situation where you are editing, for example, the copy of the file in /var/www2/html, whereas the DocRoot is set to /var/www/html. Try something like updatedb && locate somefile.php to see where else it might be finding the file in question.
Aug
7
comment PHP Files being cached by unknown entity
Assuming it's not being reached directly, try adding some disk logging (or syslog()) to both the calling page and the file in question.
Aug
7
comment PHP Files being cached by unknown entity
How is the file in question being run? Via {include,require}{,_once}()? If so, how is the file you are using to test being run? For example, could this be an issue of browser cache?
Jul
5
comment Varnish memory management
Varnish uses the cache you have configured it to use. It will not respond to a low-memory condition by switching to a disk-backed cache. It does not monitor, at any level, whether you are running out of RAM. It concerns itself solely with itself. To emphasize: it will happily allocate more RAM to store the unlikeliest result in its LRU list, at the expense of causing the OOM killer to kick in and kill mysqld. It simply doesn't know or care. It uses what you've told it to use.
Jun
20
comment varnish error 503 service unavailable guru meditation
Correct. To put it another way: either drop the ^ and $, or swap == for ~, in the line where you test for whether to set req.backend to app02.
Jun
20
comment How to do a file/dir exists conditional in Puppet?
You are absolutely correct. Thank you for the taking the time to find that link. I have deleted my comment so as not to confuse the issue. I would like to propose an update your answer, however. Manifests are compiled on the master, but are evaluated on the client. In particular, without this clarification, the mechanism of function of "onlyif" and similar directives becomes unclear.
Jun
10
comment extract file on remote server without SSH access
@MIfe Good point! Big enough for a 10+ MB database, given that we're compressing. But yes, for bigger sizes, simply throw the base64 data into a file on the destination side. To re-emphasize: not always the most elegant solution, but occasionally the most practical. Use other solutions if you can.
May
31
comment How do I improve the performance of my Drupal site with a lot of concurrent users?
Excellent! To this I'd add a few notes: 1) Be sure to enable and configure APC. In particular, ensure your apc.shm_size is sufficient to avoid filling the cache. 2) The importance of a tool like Varnish cannot be overstated. Even if 100% of your pages are dynamic and uncacheable, a good VCL will enable you to remove all load related to static content like images, meaning you'll still see a benefit. 3) memory_limit=6000M is not just absurd, it's actually bad. If you have an out-of-control child, you want it to die much sooner than after it malloc(6g)s (and probably OOMs the box).
May
7
comment FTP ip reached by using SFTP command but not FTP
For the sake of extra confusion, I'll also mention FTPS: FTP over SSL. It's the bastard stepchild of HTTPS and FTP, and it's horrid, but you do occasionally find it in use. There's also TFTP, which is a whole 'nother thing yet. So in total, when someone says FTP, if they're not being precise, they could mean any of four different protocols—(plain ol') FTP, SFTP, FTPS, or TFTP. At press time, a new version of the FTP discussion protocol, tentatively named dFTP, is being worked on to facilitate accurate interhuman conversations regarding the FTP protocol flavor in use.