fzaninotto / screenshot-as-a-service

Website screenshot service powered by node.js and phantomjs
1.1k stars 243 forks source link

Takes 2 minutes and no reply from server #2

Closed ghost closed 12 years ago

ghost commented 12 years ago

curl http://localhost/www.google.com > out.png

it will take 2 minutes and finally end with no reply from server and no screenshot image is produced.

I installed http://code.google.com/p/phantomjs/downloads/detail?name=phantomjs-1.5.0-linux-x86_64-dynamic.tar.gz&can=2&q=

Ubuntu 12.04

1GB RAM

fzaninotto commented 12 years ago

Does phantomjs work as standalone on your config? Can you execute a test phantomjs script?

ghost commented 12 years ago

yes the phantomjs rasterize.js script runs extremely fast. takes less than 5~8 seconds for any given page.

fzaninotto commented 12 years ago

what's your node.js version , and the version of the installed package (npm list output)?

fzaninotto commented 12 years ago

bump, since I can't reproduce your issue you'll have to give me more details.

joke2k commented 12 years ago

├─┬ config @0.4.11 │ ├── coffee-script @1.3.3 │ ├─┬ vows @0.5.13 │ │ └── eyes @0.1.7 │ └── yaml @0.2.3 ├─┬ express @2.5.8 │ ├─┬ connect @1.9.2 │ │ └── formidable @1.0.11 │ ├── mime @1.2.4 │ ├── mkdirp @0.3.0 │ └── qs @0.4.2 └── request @2.9.153

$ node app Phantomjs internal server listening on port 3001 Express server listening on port 3000

curl http://localhost:3000/?url=www.google.com > out.png

screenshot - rasterizing http://www.google.com screenshot - sending response

... generates an empty file

fzaninotto commented 12 years ago

what's the node.js version? what's the phantomjs version?

joke2k commented 12 years ago

$ node --version v0.6.10

$ phantomjs --version 1.6.1

on Macos 11.4.0 Darwin Kernel Version 11.4.0

bgrins commented 12 years ago

If you update the node version it will work. I had the same problem.