MySQL Server Gone Away - Large Packets the Issue?

If you are scratching your head trying to figure out why you keep getting MySQL server gone away error messages despite the fact you have bumped up all the timeout etc configurations to high values then this could be your solution. MySQL will also give you this error if you try to send a packet that is larger than the packet size defined. We had an application that was using MariaDB which has a default max allowed packet of 16M by default. Read On →

CentOS + Sun Java + Amazon AMTU 2

In a follow up to our popular blog post describing the process of getting AMTU 1 set up on a Centos server, this post describes how to get the latest version 2 of AMTU running. Things have moved on and thankfully it is a lot easier than it was. Firstly get Sun Java installed. You will need to get the URL for downloading the RPM from here: http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1637588.html Accept the agreement, download the correct RPM version and then pause it. Read On →

Wondering what you're waiting for? Mytop tells all

Mytop is a handy utility which shows what queries are currently being executed on your MySQL server - useful for those times when you’re not quite sure if it’s still on the job Running mytop is easy, just run it from the command line and it’ll give you a top-like list of any queries currently being executed on the server You need to tell my top how it should connect to your database. Read On →

Running PHP Scripts as Apache or a Shell User

If you have PHP scripts that need to be able to run via the web server as Apache and also be runnable directly on the command line then you may run into permissions issues, especially if those scripts are doing anything with files. The scenario is that you run the script via the webserver and all of the files etc that are created are owned by Apache. Then you try to run on the command line and the script cannot run because it does not have permission to access Apache’s files. Read On →

Stop Magento writing to /tmp

So some of us disagree when it comes to what should happen when magento cannot write to var/ in the webroot. Magento itself chooses to try /tmp/magento/ if the var/ folder is not writable. This can cause many issues and confusion. Not least of which emptying var/ and making it writable does not make magento start using it, if there’s already a /tmp/magento! One preferable option is to force magento to just stop if it can’t write to var/ - here’s a simple way to do this, which is sneaky but really handy :- cd /tmp ln -s abracadabra-dangling-symlink magento What that does is create a dangling symlink in /tmp/ called magento, which cannot be overwritten by a directory. Read On →

Creating RPMs

One thing that I often get asked as a package maintainer is how hard is it to make rpms? Well, here’s a little secret, if you have the right tools, it’s actually quite easy. The main tool I use is mezzanine - one of the people I worked with on the cAos Linux distributions wrote this toolset in perl, and it is installable even on debian-based distros. His website is experiencing issues at the moment but it is http://beta.kainx.org/. Read On →