An article Don’t Compare Averages from Martin Fowler has lots of good info about data visualisation techniques.
I wanted a backup of my Thunderbird data on my Debian desktop, and I created it like this:
jj5@tact:~$ tar -c -f jj5-.thunderbird.tgz --use-compress-program='pigz -p 7 --best' .thunderbird
So I was running a backup with rsync and I saw this:
lib/mysql/ibdata1 437.40M 33% 4.53MB/s 0:03:10 inflate returned -3 (0 bytes) rsync error: error in rsync protocol data stream (code 12) at token.c(557) [receiver=3.1.2] rsync: connection unexpectedly closed (155602 bytes received so far) [generator] rsync error: error in rsync protocol data stream (code 12) at io.c(235) [generator=3.1.2]
The issue seems to be that if you’re using rsync compression and the remote file gets changed while the rsync copy is in progress then shit gets corrupted. My solution was to handle error level ’12’ and retry without compression. If the file changes while the rsync is in progress the file will be corrupt, so you shouldn’t rely on the integrity of such files.
Turns out MySQL doesn’t load timezone info by default! As you can read about here.
To load MySQL timezone info:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
Got linked to this article today, NoSQL Data Modelling Techniques. I don’t think I’m going to have the time to read it, but I skimmed it, and maybe someone else will be interested. It talks about various data modelling strategies and their implications.
I was configuring MediaWiki to allow uploads and was getting an error in the browser about the POST data being too large (“does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.”). I had a look in the Apache error log and found:
[Thu Feb 23 16:12:45 2012] [error] [client 220.127.116.11] request body exceeds m aximum size (131072) for SSL buffer, referer: https://www.jj5.net/morpheus/Speci al:Upload [Thu Feb 23 16:12:45 2012] [error] [client 18.104.22.168] could not buffer messa ge body to allow SSL renegotiation to proceed, referer: https://www.jj5.net/morp heus/Special:Upload
So I did some research. I found this document, File upload size which suggested editing /etc/php5/apache2/php.ini which I did:
upload_max_filesize = 20M post_max_size = 80M
Eventually I found Bug 491763 – HTTPS+SSLVerifyClient require in <Directory>+big POST = Apache error which suggested I needed to apply the SSLRenegBufferSize directive which I did like this:
<Location /morpheus> SSLVerifyClient require SSLVerifyDepth 1 SSLRenegBufferSize 20971520 </Location>
And then after restarting Apache the problem was solved.
Been learning about the Data URI scheme. That’s what you use to embed image data in HTML or CSS.
I’m always wondering how big I should make my database columns. I put together a simple PHP script which demonstrates the sizes of various strings which is handy as a reference when thinking about how big you should make your fields.