32 comments

[ 3.0 ms ] story [ 75.4 ms ] thread
I'm getting the following error "Cannot allocate memory - fork(2)"

You can check out this video to learn more about hurl http://vimeo.com/6238577

Yep, me too. Seems like a useful service though.
I can donfirm that. Only on the baconfile-example, tough. "Cannot allocate memory - fork(2)"
I e-mailed Chris and Leah a friendly notice last Sunday about these errors and never heard anything back...
I don't think you'll see it fixed any time soon.

Using a fork per request is the easy way out. The problem as you've all seen, is that memory will be used up very very quickly.

The solution is to rewrite the app to use an event loop like select or epoll, or to queue the requests in a message queue: doable, but worth the effort? I doubt it, since the website looks like a hobby rather than a commercial product.

Forking could fix the fork problem.

That is, if someone forks hurl (http://github.com/defunkt/hurl) and rewrites it to use one of the fixes you referred to above, I'm sure they'd merge that in and deploy that.

Doing it with Resque would make a lot of sense since hurl uses Redis already.

Well sure, if someone does the work for them.

I'm saying that's probably why Chris and Leah haven't fixed it already and probably for many days to come.

Yeah, I know. I just wanted to point out that we're not totally helpless here like we would be with closed-source software, and maybe encourage someone to fix it :)
And I just wanted to point out that this isn't a simple 2-3 line fix so people won't get their hopes up trying to see if it's ready every few hours.
Sounds like a great usecase for Node.js. =)
I assume that the problem is that because they're using Redis, the available memory was filled up with data from the database.
Pretty amazing idea. Now if they could fix the "Cannot allocate memory - fork(2)" error...
I made myself a Flash app a while ago that creates POST requests and has a little profiles system. I would not be able to fix half the bugs I find without it.

Since both my app and this website have unavoidable network delays, I think I'll be retiring my program. That is, when the "Cannot allocate memory" bug gets fixed.

Hmmm. So given that you guys just broke it, can anyone explain what it did?
(comment deleted)
Like this really: http://web-sniffer.net/ (but you can store urls looked-up in your user history, alter headers sent, add parameters, ajax, follow redirects, use Basic Auth, and have permalinks)
How did you get a .it domain? As far as I know they are restricted to EU citizens or companies.
There are companies which act as proxies, e.g. EuroDNS.
This little app won the 2009 Rails Rumble, but they put it on Sinatra after that I suppose. It's a really nice example of a proxy server coded in ruby if you're looking for that sort of thing. And reading the source is a good introduction to Redis integration as well. I actually have a local copy running on my computer most of the time for debugging web apps.
They won the completness category and really deserved it - the little bits of polish made it shine. It's also worth noting they actually wrote it in Sinatra during the competition, not after, a railsrumble 2009 was more a rack rumble ( but that doesn't quite have the same ring to it)
Since Hurl.It isn't working, thought I'd mention a site I've been using for this for over a decade.

Rex Swain's HTTP Viewer - See exactly what an HTTP request returns to your browser:

http://www.rexswain.com/httpview.html

I just use python / urllib
And you get no syntax highlighting, no prettyfying of the response (adding linebreaks and stuff), etc.

Plus, my experience (as a novice Pythonista) trying to get http basic auth working with urllib was hell. It takes like 5 obscure lines, you have to know the "realm", which I didn't even know about before. That's way more complicated than just typing stuff into text boxes

You just have to base64 encode the username/password and add it in as the value of an HTTP header. Tedious compared to most other HTTP libraries though, I agree.
Could we please give this a more descriptive title?
On OS X I use à little app called HTTP Client to do THE Same.
I fail to see the usefulness of this... curl + http requests are easy and highly googleable in most languages..