4,474 reputation
1724
bio website BlackMesh.com
location
age
visits member for 4 years, 6 months
seen Dec 3 at 20:52

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


Mar
19
comment nginx can't find cgi two levels deep
wiki.nginx.org/HttpCoreModule#try_files covers this quite nicely.
Mar
19
comment What is the best way to resize the “/” mount point that is not LVM?
You don't say what filesystem you're running, but modern best practices typically don't include splitting the OS across so many partitions. That was much more relevant back before journaling filesystems.
Mar
4
comment Varnish 503 error after exactly 60 seconds… how to change this timeout value?
bereq.first_byte_timeout exists, but I'm not sure it's writable. If it is, you could also modify that inside of vcl_pass as opposed to defining a second backend just to change first_byte_timeout.
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.