News for hackers. Stuff that matters.
Re:Hurl by datums on Saturday May 01, 2010 @04:21PM (#1311167)
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

Re:Hurl by rufo on Saturday May 01, 2010 @05:16PM (#1311245)
I e-mailed Chris and Leah a friendly notice last Sunday about these errors and never heard anything back...
Re:Hurl by codexon on Saturday May 01, 2010 @05:47PM (#1311296)
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.

Re:Hurl by jackowayed on Saturday May 01, 2010 @06:22PM (#1311336)
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.

Re:Hurl by codexon on Saturday May 01, 2010 @06:49PM (#1311381)
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.

Re:Hurl by jackowayed on Saturday May 01, 2010 @06:50PM (#1311384)
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 :)
Re:Hurl by codexon on Saturday May 01, 2010 @06:57PM (#1311395)
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.
Re:Hurl by jteo on Sunday May 02, 2010 @02:32AM (#1312087)
Sounds like a great usecase for Node.js. =)
Re:Hurl by cmelbye on Saturday May 01, 2010 @08:34PM (#1311566)
I assume that the problem is that because they're using Redis, the available memory was filled up with data from the database.
Re:Hurl by Emore on Saturday May 01, 2010 @04:24PM (#1311171)
Yep, me too. Seems like a useful service though.
Re:Hurl by p0ppe on Saturday May 01, 2010 @04:24PM (#1311173)
I can donfirm that. Only on the baconfile-example, tough. "Cannot allocate memory - fork(2)"
Re:Hurl by kjbekkelund on Saturday May 01, 2010 @05:06PM (#1311231)
Hurl inspired Twitter's API console: http://dev.twitter.com/console

It's open sourced, and contains some great code: http://github.com/defunkt/hurl. I used it as an inspiration when working on my first Redis project using Sinatra.

Re:Hurl by Terretta on Saturday May 01, 2010 @07:11PM (#1311421)
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

Re:Hurl by slig on Saturday May 01, 2010 @05:53PM (#1311305)
If you're on a Mac: http://ditchnet.org/httpclient/ .
Re:Hurl by adrianwaj on Saturday May 01, 2010 @04:25PM (#1311175)
Re:Hurl by helium on Saturday May 01, 2010 @05:46PM (#1311295)
How did you get a .it domain? As far as I know they are restricted to EU citizens or companies.
Re:Hurl by jcsalterego on Saturday May 01, 2010 @07:01PM (#1311397)
There are companies which act as proxies, e.g. EuroDNS.
Re:Hurl by endtime on Saturday May 01, 2010 @08:14PM (#1311535)
Could we please give this a more descriptive title?
Re:Hurl by stanleydrew on Saturday May 01, 2010 @06:31PM (#1311349)
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.
Re:Hurl by Sutto on Saturday May 01, 2010 @06:57PM (#1311394)
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)
Re:Hurl by BoppreH on Saturday May 01, 2010 @04:42PM (#1311203)
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.

Re:Hurl by st3fan on Saturday May 01, 2010 @08:28PM (#1311559)
On OS X I use à little app called HTTP Client to do THE Same.
Re:Hurl by steverb on Sunday May 02, 2010 @08:10AM (#1312378)
Might I recommend the poster plugin for Firefox? https://addons.mozilla.org/en-US/firefox/addon/2691

Has the added benefit of working on stuff you are developing on your own machine.

Re:Hurl by alexandros on Saturday May 01, 2010 @04:41PM (#1311201)
Pretty amazing idea. Now if they could fix the "Cannot allocate memory - fork(2)" error...
Re:Hurl by andrewcooke on Saturday May 01, 2010 @05:16PM (#1311247)
Hmmm. So given that you guys just broke it, can anyone explain what it did?
Re:Hurl by adrianwaj on Saturday May 01, 2010 @05:25PM (#1311266)
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)
Re:Hurl by andrewcooke on Saturday May 01, 2010 @05:37PM (#1311285)
Ah, cute, thanks!
Re:Hurl by keefe on Sunday May 02, 2010 @06:55AM (#1312315)
I fail to see the usefulness of this... curl + http requests are easy and highly googleable in most languages..
Re:Hurl by todd3834 on Saturday May 01, 2010 @07:40PM (#1311475)
I just use python / urllib
Re:Hurl by jackowayed on Saturday May 01, 2010 @08:00PM (#1311510)
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

Re:Hurl by cmelbye on Sunday May 02, 2010 @12:43AM (#1311968)
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.