4,351 reputation
1723
bio website BlackMesh.com
location
age
visits member for 4 years, 3 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.


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.
May
7
comment apc “open() /www/cache/xxx failed. no such file or directory” error
I hate to say it, but at this point, you're probably looking at greping across the PHP files, and dump of any relevant database(s), looking for e4ce8db565491cdcf27ab61a441xxxx, or failing that, for "cache". This will be ugly, but if you can't reliably reproduce the issue, you have little other choice. Are you sure there's nothing in common amongst the clients hitting this issue (e.g. same User-Agent)?
May
3
comment apc “open() /www/cache/xxx failed. no such file or directory” error
Sergey is absolutely correct. Try going to the referer page with a browser that supports request tracing (e.g. using a "developer console", Firebug, etc.). With that, look for a request to this "cache" directory. It's coming from somewhere. Failing that, it might be someone trying to hack the site and simply spoofing the Referer header in the course of looking for a specially-named file. You didn't mention if this message appears often and from diverse clients; if not, that might lead you to such a conclusion.
May
3
comment Nginx reverse proxying Drupal content served with Apache
What's in your Apache's error log for the 500? You call the 500 "standard", but is that an nginx 500 or an Apache 500?
Apr
23
comment The Apache mod rewrite module doesn't work when using the IP
@KristvanBesien: A <VirtualHost> need not contain a ServerName directive. In the absence of one, it will use the top-level ServerName (typically dynamically determined). Additionally, any configured and applicable (based on its IP/port tuple(s)) VHost will always "win" versus the main context.
Mar
18
comment How to monitor glusterfs volumes
@ArieSkliarouk: Updated to cover both cases, but be forewarned that the relevant message was removed in November 2011; see git.gluster.org/… . Thus, this is likely not going to work on newer Glusters. If you find the shorter code harder to understand, that's fine, but it is significantly more robust than using a temporary file, so consider refactoring it for readability instead of dismissing it for perceived lack of that attribute.
Feb
16
comment CentOS lost Root Access
Speaking as someone who works for a hosting company: if you ask Support to give you a hand with this, I 100% guarantee they have a process in place for adding these sorts of parameters to the boot process. And if you ask very nicely and describe what you did very well, they'll likely be able to very quickly solve your limit issue. There's even a small chance they can do it without rebooting the machine.
Feb
14
comment Varnish not showing custom headers
@Kenny: Great! Please update your question and close it.
Feb
12
comment Varnish not showing custom headers
Also, while we're on documentation: please include a complete request/response pair (not just the response as you have above), and the output of "varnishlog" (you can sanitize IP addresses if you'd like, but leave the rest alone, please) during that test.