Advagg work fine, all my CSS and JS files are grouped in two files, and I have a lot, 40 CSS and 47 JS files
<link type="text/css" rel="stylesheet" media="all" href="/sites/default/files/advagg_css/css_15ef00e9abd021ebcfae51f2630534a5_0.css"/>
<script type="text/javascript" src="/sites/default/files/advagg_js/js_7731abe2e0b5817cf82e701c67baa84c_0.js"></script>
But I'm experimenting problems when open the admin pages: admin/reports/status or admin/settings/advagg that freeze the site (not the server). That pages never open and from that lapse of time (1min or 2) any user can't open any other page.
I notice that the problem is when use FastCGI, if I enable and disable this the problem appear and disapear.
Let me know if you need more information to resolve this
thanks
Comments
Comment #1
mikeytown2 commentedDo you have this same issue when using HTTPRL?
Comment #2
RAFA3L commentedI get this on the admin/reports/status page, maybe I need check the php 5.3.5 configuration. I can see this error only using Apache module instead of Fastcgi because using Fastcgi the admin pages never load.
Comment #3
mikeytown2 commentedIs this with the latest dev of httprl?
Comment #4
RAFA3L commentedWith the latest httprl dev version and advagg 6.x-1.6 all work perfect on apache module but when I change to fastcgi the problems come back
All the admin pages load after a long time
In admin/reports/status
Adv CSS/JS Agg - Asynchronous Mode Set to FALSE.
and
Comment #5
mikeytown2 commentedI wonder if FastCGI has issues with stream_select or with hanging connections. If your wondering HTTPRL is code that is inspired by AdvAgg; they both use the same principle thus just using HTTPRL will allow us to debug this faster.
Below is some debug code that I created from a quick copy paste from inside of
httprl_requirements(). If you could run it and report back the output that would be helpful.
Comment #6
RAFA3L commentedI must change the line
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
to
require_once getcwd().'/includes/bootstrap.inc';
After that I get this code at the top of the page using Apache module
And using Fastcgi
Comment #7
mikeytown2 commentedSounds like FastCGI doesn't like stream_select(), I wonder if socket_select() will work. Will have to come up with an alt #1272542: fallback code for stream_select; cURL is next up. Do you have that installed on your server?
Comment #8
RAFA3L commentedYes, MediaTemple has cURL installed
Comment #9
mikeytown2 commentedIts the weekend so I'll come back to this on Monday; I will be reading up here though
http://www.phpied.com/simultaneuos-http-requests-in-php-with-curl/
http://www.rustyrazorblade.com/2008/02/curl_multi_exec/
http://php.net/curl-setopt
#1033142: cURL based alternative to drupal_http_request
Comment #10
mikeytown2 commentedcURL doesn't work with non blocking requests... so going to try fsockopen from Drupal 6's drupal_http_request. Can you test this code out?
Comment #11
RAFA3L commentedFatal error: Call to undefined function nonblocking_drupal_http_request() in /var/www/vhosts/mydomain.com/httpdocs/prueba/sites/all/modules/advagg/advagg.install on line 142
and the line is
nonblocking_drupal_http_request($url, $headers);
Comment #12
mikeytown2 commentedHow are you testing the code? I defined a new function called nonblocking_drupal_http_request in the code block above; and why is it inside of advagg.install? Copy the code block into something like test.php in the drupal web root, next to index.php.
Comment #13
RAFA3L commentedSorry, in test.php with fastcgi module:
with apache
Comment #14
mikeytown2 commentedLooks like FastCGI kills PHP when the connection is closed... I have 2 more tests for you to try:
Comment #15
RAFA3L commentedWith test1
500 Internal Server Error
adn test2
CGI/1.1Array
(
[httprl_nonblocking] => Array
(
[0] => This server does not handle hanging connections.
[1] =>
[2] =>
)
[httprl_blocking] => Array
(
[0] => This server does not handle hanging connections.
[1] =>
[2] =>
)
)
Comment #16
mikeytown2 commentedhmm lets try something a little more standard. This is using drupal_http_request(). Lets make sure this works. If this doesn't work then drupal wouldn't pass the system install requirements (system_check_http_request())
Comment #17
RAFA3L commentedsorry by the delay, with the last code now I get a 500 internal server error after a long time trying to load
I put the code in a test.php file in the root of the drupal site.
Switching to the apache module I get
CGI/1.1Array
(
[drupal_http_request] => Array
(
[0] => Works.
[1] =>
)
)
b:1;
Comment #18
mikeytown2 commentedWhat happens when you do this?
http://api.drupal.org/api/drupal/modules--system--system.module/function...
Comment #19
RAFA3L commentedWith apache module:
b:1;
fastcgi:
b:0;
and long time to load
Comment #20
mikeytown2 commentedThere is something wrong with that setup (FastCGI) if Drupal Core doesn't work with it. This might help
http://drupal.org/node/588186
If it's still an issue I would jump on IRC and see what people say about how to fix it.
Comment #21
RAFA3L commentedYou are right something is wrong with my server. I have a small VPS with 512 of ram and running a medium site with fastcgi to optimize the memory usage, this work perfect under fastcgi but without advagg, because the first time I install advagg the problem appear and I had to uninstall it. Now this site is working with Cloudflare only.
Now I was testing yours codes under another domain in the same server and I saw the same problem, even without using the advagg module. I did a new and fresh installation of drupal and I see that is running slow all what is inside the admin/ pages, slow but finally load the pages.
Sorry for the bad reference, I'll try to check this first
Comment #22
mikeytown2 commentedI've attached a patch that adds in better debugging for httprl on the status page.
Comment #23
mikeytown2 commentedAbove patch has been committed to HTTPRL. This is not an issue with AdvAgg; HTTPRL has been improved to help with the diagnosis of HTTP request errors.
Comment #24
RAFA3L commentedI notice one thing...
Installing a new and fresh Drupal site under Fastcgi and adding this to settings.php
$conf['drupal_http_request_fails'] = FALSE;
and enabling only Advagg I was happy because the page loads fast, even the admin/* pages
But the css styles don't load, the files folder was chmod 770. The folder advagg_css and optimized files were created but don't load.
When I change the permissions of the folder files/* to 777 the problem came back, turn all the site slow