Over the last four weeks, I’ve been plagued by numerous PHP segfault problems – multiple versions of PHP, on different operating systems, on different hardware, and running completely different codebases.
Yesterday, I ran into a segfault that I couldn’t work around. It is happening with Apache + mod_php, running inside a Centos 6-based Docker container. Docker is hosted on Ubuntu 15.04.
Here are the steps I took to enable core dumps for Apache inside the container, so that I could examine the segfault.
On Ubuntu (the host machine):
- sudo sysctl -w fs.suid_dumpable=2
- sudo sysctl -w kernel.core_pattern=/tmp/core-%e-%s-%u-%g-%p-%t
That’s it. Your Docker container automatically inherits these settings, and Apache will start coredumping without being restarted.
Why Does This Work?
With Docker, because it’s not a virtual machine in the way that VMWare or VirtualBox is, the container inherits the settings of your host operating system. Inherits, and can’t change them inside the container (which is not ideal).
You have to enable coredumps on your host operating system.
Ubuntu 15.04 ships with coredumps already enabled. Ubuntu also ships with an app that gathers coredumps and ships them off to Canonical for inspection – this is the ‘A system error has been detected’ dialog box that appears all too frequently on a modern Ubuntu system.
Ubuntu’s helper app can’t intercept coredumps that occur within a Docker container, so you don’t have to worry about it in there.
Be the first to leave a comment »
I’ve recently built a product in Node JS, and it was a very positive experience (more on that in another blog post). I’m now looking around at what I need to do to package it all up for customers and entrepreneurs – hosting, developer meetups, that sort of thing. I’m looking for the wider ecosystem that customers can tap into. I’m a bit surprised at what I found during my research, and I thought I’d share it in case anyone else can add to it.
Why Hosting Matters
Let’s not beat about the bush here. As a rule, Node JS’s target audience probably doesn’t know enough to safely and securely run their own Internet-connected servers. It isn’t their skillset. A customer using Node JS really needs someone to look after all of that for them.
That isn’t a service I want to have to build myself if I don’t have to. For the customers I’m targeting, being able to say, “go there, sign up, and deploy to their cloud, and they’ll look after it all for you” is the right solution for everyone.
Where Is All The Hosting?
With all the buzz and hype around Node JS, it seems reasonable to think that there’d be plenty of cloud providers out there offering Node JS hosting services. Not the “here’s how to install it into a VPS”-type stuff, but a Heroku / Engine Yard-like service targeted at Node JS.
However, a quick Google for “nodejs hosting” turned up the following results on the front page:
- 1 hosting provider which is public, free, and unable to provision new services when I tried (No.de)
- 3 hosting services in private beta (Nodester, NodeSocket, and NodeJitsu.
- … and zero paid-for ads offering Node JS hosting.
No.de is the hosting service from Joyent, who are the current guardians of the Node JS project itself. Their Node JS product page directs you to the No.de service. But unfortunately, No.de is a limited-capacity service, and you can only get your app on there if you’re lucky enough to catch them when there is spare capacity. Joyent do offer a VPS w/ Node JS pre-installed, but you’d be hard-pressed to find the product if you didn’t know it existed, as it isn’t linked to from their Node JS page at all.
The other three services all look interesting (NodeJitsu in particular caught my eye), but I can’t sit down in a sales meeting today and recommend any of them to a customer, because until they are public services, I can’t be sure that my customers can get a login and get their apps deployed and running.
But what really caught my eye is that no-one seems to be using Google AdWords to advertise their Node JS hosting service right now. That’s a significant smell, and a big surprise to me. I don’t want to draw any conclusions about that, just simply ask the question: does it mean that there’s an opportunity that isn’t being exploited yet, or does it mean that the opportunity isn’t big enough yet for folks to invest in?
Where Are The Community Meet-ups?
As well as hosting, I’m also interested in being able to introduce customers to other Node JS users, preferably through established developer meetup groups. From the customer’s perspective, being part of a community helps them broaden their skills and experience, and potentially helps them find new employees if they start to grow. From my perspective, the most valuable marketing of all is word of mouth, and having customers going to meetups and saying that they’re using our product because it solves their problems is a very important way of finding new customers.
We’re just outside London, which is a veritable hive of startup activity these days. But looking on Meetup.com for existing meetups for Node JS, all I could find is this waiting list. I did find the London Node User Group via Lanyrd, and I plan on trundling over to their next meetup on Wednesday, but that was it.
We seem to have meetups coming out of our ears in London right now on all sorts of technical topics; the lack of ones focused on Node really does stand out.
Thoughts And Conclusions
For a product that has had a lot of sustained buzz, and which is a good solution for some technical problems, the almost complete absence of an ecosystem around Node JS caught me completely by surprise. Are we just ahead of the curve, and using Node JS very early on in its adoption? Are there resources out there that I’ve just failed to find? Or is Node JS actually just another passing trend which failed to get enough traction?
I don’t know. Your thoughts and comments most welcome below!
42 comments »