Archive for March, 2012
apr_socket_connect(): No connection could be made because the target machine actively refused it.
When the one of my local projects has been tested with an Apache HTTP server benchmarking tool (ab) I’ve got an error:
ab -c400 -n2000 http://localhost/myproject/ |
Test aborted after 10 failures.
apr_socket_connect(): No connection could be made because the target machine actively refused it. (730061)
I’ve tryed to configure httpd-mpm.conf the mpm_worker_module section but nothing changed. I’ve checked the mpm module that is using:
httpd -l
|
Compiled in modules:
…
mpm_winnt.c
…
So, my fault.. I’ve tryed to configure mpm_worker_module that isn’t used but the current mpm module that is used is mpm_winnt_module because I use XAMPP on Windows.
To fix this error you shoud set ThreadsPerChild with a bigger value and restart the web server.
cssRules null in Chrome
I found this problem when tryed to use cssRules of document.styleSheets[i] locally in Chrome but found that cssRules is null and only in Chrome. I need only to add some rules but not to read or modify existed rules so this fix is not for all.
Here’s the bug .
And here’s my workaround for this problem:
var styles = document.styleSheets; var style = null; for (var s = 0; s < styles.length; s++) if(!styles[s].href) { style = styles[s]; break; } if (style == null) style = jQuery("text/css\">") .appendTo('head').get(0); var rules = style.cssRules; // is not null!!! |