Phantomjs writes completely transparent images - phantomjs

Simple rasterize.js script (from phantomjs examples) on my Debian server sometimes writes completely transparent images (if it's PNG), but it have regular dimensions. It is happening most of the time, but in rare moments it makes correct image.
I can't find out why it happens.
My system:
Debian GNU/Linux 7.2 (wheezy) with ext4
Phantomjs 1.9.2
rendering sites: http://www.yahoo.com/ and http://phantomjs.org/
Script used: https://github.com/ariya/phantomjs/blob/master/examples/rasterize.js
PS: I also faced with this problem on CentOS server.

Related

imagemagick segmentation fault after apache graceful restart

We are using ImageMagick via imagick to generate a file containing many SVG files in it. The script tries to make them fit as much as possible in order to avoid large empty spaces so it is kind of a heavy task.
Everything went OK until we decided to install netdata on the server to monitor it, we can't say netdata is the cause of this 100% but we're pretty sure this started after installing it.
Now after every apache graceful restart we're getting segmentation fault errors but ONLY when trying to generate a file with "multi color" SVGs, everything works ok when generating a file with "plain color" SVGs.
The problem disappears if we restart apache (sudo service httpd restart).
Our theory is that restarting apache grafecully leaves an apache child thread hanging and crashes when trying to use it or something.
We tried reinstalling ImageMagick and imagick but nothing changed, we stopped netdata since we noticed this and tried to debug using gbd (it ended up slowing apache and making it difficult to restart it) and we could not find anything useful. I'm thinking in update libgomp (installed version is 4.8.5 4.el7 and with yum info I've seen the version 4.8.5 28.el7) but I'm not sure if it can cause problems in other parts of the system
Not sure if this is related to this site but any of you have seen anything like this?
Thanks
Server specifications:
CentOS 7.0.1406
Apache/2.4.6 (CentOS)
PHP/5.6.26
ImageMagick 6.7.8-9 2016-06-16 Q16
imagick 3.4.3

wkhtmltopdf goes extremely slow on different environment

I am developing a PHP web application with CakePHP 3.4 framework, and i am using wkhtmltopdf 0.12.4 to output dynamic content in a .pdf file. Currently i'm using three different environments where i develop and test my application:
In my local environment (XAMPP 32-bit for Windows), wkhtmltopdf works great. It takes ~1 second in rendering .pdf files
In a remote testing environment (CentOS 7 64-bit using apache2, 4GB memory), works great too.
In my third remote testing environment (Another CentOS 7 64-bit distro with similar CPU specs as the second one and 4GB memory), wkhtmltopdf takes up to 20 seconds in rendering the same .pdf file
What could be causing this behavior in the third environment? How can i monitor or debug wkhtmltopdf process to help me identify why .pdf rendering is so slow?
Remove rgba and set border-radius to 1px in your CSS files (or completely remove them if they are not needed). That should speed up the PDF generation process.
Similar issue
Another reson can be your current default printer on windows. See:
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4891
If you use a standard printer that is
a network printer
you use the windows default driver for that printer and have not installed the manufactors printer driver
-> wkhtmltopdf is really slow

What are the absolute minimum packages needed for Debian Wheezy

I want to install the bare minimum of Debian Wheezy on an embedded controller with 128Mb flash.
So far I found the nice debootstrap method for installing, like described here. This end up with 157Mb disk usage after adding ssh.
Someone created a nice image for RasPi with have 118Mb, see here.
Additionally I tried shrinking by this guideline here, but it also dont succeed much.
Currently the controller is running with EmDebian Grip occupies 79Mb with 182 packages installed. But under Wheezy it needs much more.
So what packages are the absolute minimum needed?
Thanks
Achim

Ubuntu Freeze if kept untouched for a few minutes

So I have Ubuntu 14.04 Installed on my system with a few "tweaks", mainly ccsm. I also have google chromium browser installed as well. I do a lot of work in the browser and usually have 10+ tabs open in my system.
I also like to use the multi-window (Workspace) and have 8 Workspaces (thus one of the reasons for ccsm).
Once I leave the computer and try to come back (before the screen locks), the computer is COMPLETELY frozen with my HDD running at very high speeds. I have a system monitor that monitors the CPU activity and HD activity and right before those things freezes, my RAM is at 100% and so is my HDD.
I'm wondering if anyone can help me FIGURE OUT what the problem is? I've been using ubuntu since '08 so I'm familiar with it. I just don't know where to start!
HELP!
I can not deal with the problem until I install the following packages as follows
sudo apt-get install linux-generic-lts-quantal xserver-xorg-lts-quantal
You could get the detailed reason from http://www.howtoeverything.net/linux/hardware/random-freezes-integrated-hd-4000-graphics
Maybe you have to consider the Google Chrome or Chromium, whose two or more different Flash plugins conflict with each other, and the freeze problem disappear after you Disable the Flash plugins in the webpage opened by inputting
chrome://plugins
in the URL address of Chrome
Or another useful method of changing the chrome plugins is to uninstall the google-chrome completely,and then install the current chrome with newest flash plugin.
After all the above are done, the system need restart.
Hope it can help. Good luck!

PhantomJS in Ubuntu 11 Server, PNG images look 256-color

So I'm using PhantomJS on Ubuntu 11 server, and after doing everything I needed to to set it up (including install Xvfb), I have found that web pages captured appear to be saved as 256-color PNG files.
I installed Phantom on Windows and it doesn't have that problem at all. Web pages are full 32-bit color. Any ideas?
Solved it. Had to run Xvfb with the following params:
Xvfb :0 -screen 0 1024x768x24
Then execute Phantom. I think there was something wrong with my init file. Thanks ##ariyahidayat :)