Introducing private MySql instances

Posted in MySql by

Last November we announced that we were using cgroups on our shared servers to protect users from each other and get rid of the “bad neighbor problem”. This works great but there is still one potential problem: many apps on a server use the shared MySql instance on that server and one user can still use more MySql resources than their fair share and therefore affect all other users on that MySql instance.
To fix that problem we have added another application to our one-click installer: a private MySql instance. This sets up a private MySql instance running as your user on the server. A few points about this instance:

  • It uses the globally installed MySql binaries and libraries. This means that if a security hole is found in that version of MySql we apply the patch for you and you don’t have to do anything.
  • On Centos-6 servers (web300 and over) it runs MySql-5.5 and on Centos-5 servers it runs MySql-5.0.
  • The MySql configuration files and data files are owned by you and the MySql processes run as you. This means that you have full control over your MySql instance: you can configure it however you like and you can stop it and start it whenever you like.
  • By default you get a cronjob that monitors your MySql instance every 20 minutes and restarts it if it’s down.
  • By default you get a cronjob that dumps all the databases in that instance every 24h and another one that deletes these dumps after a week. This is because MySql recommends backing up a dump of your databases rather than directly backing up the MySql data files.
  • Note that a private MySql instance can use between 50MB and hundreds of MBs of memory depending on how it’s configured and how much data you’re storing. So if you’re going to use it for anything non-trivial we recommend getting at least 512MB of memory on your account or using one of our new 1GB, 2GB or 4GB plans.

New hosting plans available with 1GB, 2GB and 4GB of memory

Posted in General by

We’re happy to announce a new range of hosting plans, from 1GB to 4GB of application memory. You can see the details on our Features & prices page.
For these new plans we have a maximum number of accounts per server (16, 8 and 4 respectively). With our use of cgroups you are therefore guaranteed a minimum of 1/16th, 1/8th and 1/4th of all resources on the server.
If you need more than 512MB of memory but don’t want a full dedicated server then these plans might be right for you.
If you would like to upgrade your existing plan just put in a request under “Account -> Upgrade / downgrade” in the control panel and we can perform the migration for you.


New websites interface

Posted in Control panel by

Today we’re proud to unveil a new development in our control panel: an improved websites interface. As a part of our ongoing effort to make the control panel better and easier to use, we’ve revised the tool you use to assemble websites out of domains and applications. Now you can add a new domain name, install a new app, and create a new website all in one place; there’s no need to navigate to several different pages.

We’ve created this introductory tutorial video to give you a quick tour:

Click here to view the video

Of course, the control panel isn’t the only way to manage your websites. Our API can be used to automate the process of creating websites and applications, if you anticipate making sites in bulk.

Let us know what you think in the comments and, if you need any help, join us in the Q&A Community.


World IPv6 Launch day

Posted in Control panel by

As you may have heard today is World IPv6 Launch day. A lot of companies around the world have worked hard to be IPv6-ready by today. The world is running out of IPv4 addresses and the solution is the new IPv6 protocol.

I’m happy to say that IPv6 is now supported throughout our various systems:

  • Our sites and have been available over IPv6 for some time
  • All of our Centos6 servers (web300 and over) and a subset of our Centos5 servers have IPv6 enabled. On these servers various services such as MySql, Postgresql, phpMyAdmin and phpPgAdmin are available over IPv6.
  • Our control panel now lets you specify whether you want a particular site available over IPv4 only, IPv6 only or both:

    IPv4/IPv6 choice
    Note that this option is only available if you’re on an IPv6-enabled server. If you don’t see this option and you want to enable IPv6 for your sites open a support ticket and we’ll enable IPv6 on your server.

  • Our control panel now lets you create custom AAAA DNS records for your domains:

    AAAA record

IPv6 provides 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses so we should be OK for a while…


Django-1.4 is here!

Posted in Python by

Today, the latest and greatest version of Django has been released. And we’ve tried to waste no time making it available to you with the new Django 1.4 one-click installer:

Django 1.4 one-click installer screenshot

The most prominent new feature of Django 1.4 is time zone support. Django can now store dates and times in a time zone-aware way. Now dates and times can be converted to visitors’ local time zone in templates and forms automatically. This feature is likely to help many developers avoid time zone pitfalls, including daylight saving time transitions often observed this time of year.

Other new developments include:

Of course, that’s not all. For more details, check out the Django 1.4 release notes. Give the new installer a try. If you have any questions, join us in the Q&A Community.


We’re hiring!

Posted in General by

Wanna work for your favorite hosting company? Well, now’s your chance! We’re currently looking for support engineers for our US and Asia shifts. Details are available at our jobs page. What are you waiting for?!

2012-04-16: these positions have been filled, but we’re always on the lookout for good people to join our team! Feel free to send your CV and inquiries to the contact address on our jobs page.


PHP-5.4 is here

Posted in PHP by

Things certainly move fast on the web. Just a few weeks ago we described our PHP setup on this blog and we proudly explained that we had both PHP 5.2 and 5.3 installed on our servers. But now that blog post is obsolete because PHP 5.4 was just released!
Fortunately we’ve already installed PHP 5.4 on all of our servers, just days after it was released:

[remi@web300 ~]# php54 -v
PHP 5.4.0 (cli) (built: Mar  2 2012 06:58:40)

We’ve also added a new Static/CGI/PHP-5.4 to our control panel for the early adopters.
If you want to switch an existing PHP app to PHP-5.4 you can do so by putting this in a .htaccess file:

<FilesMatch .php$>
    SetHandler php54-cgi

Amongst many other improvements PHP-5.4 is faster and uses less memory and it provides a new feature called Traits which enables developers to reuse code.
More details are available in the ChangeLog.


Welcoming Rails 3.2.1 and Ruby 1.9.3

Posted in Rails by

As you may have noticed, a new installer has appeared in the control panel for Rails 3.2.1:

Not only does the new installer include the latest iteration of Rails, but it also sports a shiny new version of Ruby, 1.9.3. Ruby-1.9.3 is now installed on all WebFaction servers:

[demo@web310 ~]$ ruby1.9 -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

The 1.9-series Ruby features various bug fixes and library changes you might expect from a Ruby release, but it also introduces some important language changes. For example, Ruby 1.9 introduces a new syntax for creating anonymous functions:

howdy = lambda {|name| puts "Howdy, #{name}."}  # old style
hi = -> (name) {puts "Hi, #{name}."}            # new style

Ruby 1.9 introduces some other syntax and API changes, including changes to string encoding. So check out the Ruby NEWS file for more information.

Meanwhile, Rails 3.2 isn’t missing out on the fun, bringing some handy improvements, too. Highlights include a faster development mode and faster request routing. Another useful feature of Rails 3.2 is easy query explanations. In development mode, ActiveRecord queries that take longer than one half second to finish are automatically explained. In general, a new explain method makes it easier to track down slow queries and investigate indices.

To learn more about the latest developments in Ruby, check out the complete Ruby on Rails 3.2 Release Notes document.

When you’re ready, give the new Rails installer a try. If you have any questions, join us in the Q&A Community.


Nine years already!

Posted in General by

Nine years ago we registered which later became WebFaction.
Since the beginning we focused on building solid foundations: fast and stable servers, great customer service and up-to-date software. A lot has happened in 9 years but we’re proud to say that the foundations are still there.

Things are definitely speeding up though and in the last year alone we’ve almost doubled in size and we’ve added more features in one year than in the previous several years: we extended into Europe and then Asia, we started rolling out a new control panel, we built a new server setup with an innovative neighbor-protection system, we provided two massive upgrades on our base hosting plan (first diskspace and then memory) and on our managed dedicated servers, we added a 1h account setup guarantee and we added a gazillion new tools and versions to our one-click installer and our server setup.

But most importantly we hope that we have sustainably kept our customers happy and we want to thank all of you for the nice comments on Twitter, on your websites and in support tickets.

To celebrate our 9-year birthday we are offering a $50 discount on all new signups (minimum one-year pre-payment). Existing customers can also get the discount if they buy extra plans for their account. To receive the discount just use the promo code “9YEARS” when you signup at or mention “9YEARS” when you request an upgrade in the control panel (under Account->Upgrade/Downgrade). This code is valid until February 12th 2012 at midnight UTC.

Here is to the next 9 years!


A Look at Our PHP Setup

Posted in Server setup by

In the tradition of A look at our Python setup, today’s post is all about WebFaction’s PHP setup. While some of our specialized installers get a lot of attention, we know that PHP is an important, if not glamorous, part of many web developers’ toolbox. So let’s take a closer look.

On our servers, PHP 5.2 is the default version. It’s not the newest and shiniest, but it’s hugely popular. For example, on Web310:

$ php --version
PHP 5.2.17 (cli) (built: Jan 17 2012 13:19:44) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube
        Ltd., and
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies

But we’re not ignoring PHP’s development. PHP 5.3 is also available:

$ php53 --version
PHP 5.3.9 (cli) (built: Jan 16 2012 15:27:59) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube

We’ve tried to provide a lot of the more popular and useful compilation options. For example, we’ve enabled libcurl support so you can start making HTTP requests, right out of the box:

    $c = curl_init();
    curl_setopt($c, CURLOPT_URL, "");

Here’s a complete list of the our compilation flags on a CentOS 6 (64-bit) server:


You can see all the details on your specific machine’s PHP setup by running php-config.

In case you missed it previously, you should also know that our PHP setup allows you to send email with PHP’s built-in mail() function. There’s no requirement to use an SMTP library to send mail (though you’re welcome to do so, if you prefer). You can send email simply, like so:

    $message = "Just testing sendmailn";
    mail('', 'Help me', $message);

Of course, PHP in isolation isn’t so useful; we can plug it into the web with our corresponding Static/CGI/PHP applications. They’re more flexible than meets the eye. By default, a Static/CGI/PHP application uses a traditional php-cgi deployment method, where each PHP script is loaded and run with each request. It’s simple, effective, and perhaps best of all, doesn’t count toward your account’s memory usage.

But if you’d like to tweak your PHP deployment method, you can choose FastCGI as an alternative. Although it consumes your account’s memory, it has better performance for some applications. To use FastCGI, create a .htaccess file in your Static/PHP/CGI application directory containing this line:

<FilesMatch .php$>
    SetHandler php52-fcgi

You can also replace php52-fcgi with php52-fcgi2, php52-fcgi3, through php52-fcgi6 to control the number of processes FastCGI will use to serve the site.

In addition to .htaccess, you’re free to use your own php.ini file to configure your PHP application. For example, you can use php.ini to set the maximum size of file uploads. See our existing Configuring PHP docs for all the details.

Finally, we have some Static/CGI/PHP-derived installers for popular tools, like WordPress and Drupal. Under the hood, they’re PHP applications through and through, so you can use what you’ve learned here to extend or customize those applications too.

We hope this gives you a better picture of what our PHP setup is capable of and what you can do with your account. If you have any questions, let us know in the comments or join us on the Q&A Community.