Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
On a fresh start-up of D6 + Advagg, with NO stored/cached data in /files/advagg_css + /files/advagg_js folders I regularly see this typical D6 report:
Warning: stream_select() [<a href='function.stream-select'>function.stream-select</a>]: No stream arrays were passed in advagg_async_send_http_request() (line 2939 of /var/www/virtual/peterbowey.com.au/sites/all/modules/advagg/advagg.module).
Warning: stream_select(): 163 is not a valid stream resource in advagg_async_send_http_request() (line 2939 of /var/www/virtual/peterbowey.com.au/sites/all/modules/advagg/advagg.module).
Once advagg builds the aggregate 'bundles' this report no longer occurs!
The above report occurs whenever the /files/advagg_css + /files/advagg_js folders are 'empty' = null!
I am sure this just means advagg could deal out some nicer error handling!
Many thanks for a great performance tool/ module. It gets better hourly!
Comment | File | Size | Author |
---|---|---|---|
#13 | advagg-1194226-13.patch | 1.28 KB | mikeytown2 |
#10 | advagg-1194226-9.patch | 1.4 KB | mikeytown2 |
#7 | advagg-1194226-7.patch | 1.57 KB | mikeytown2 |
#6 | advagg-1194226-6.patch | 1.58 KB | mikeytown2 |
#5 | advagg-1194226-5.patch | 1.5 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedHow reliably can you repo this bug? Try this, it will change the default timeout to be 30 seconds when using stream_select.
Comment #2
Peter Bowey CreditAttribution: Peter Bowey commentedRefer #1
Easy to 'reproduce', I just clear the advagg_js + advagg_css directories, then purge the Edgecast CDN.
I also reboot the Linux Box. (this clears Linux Memcached Daemon...:)
I will test that timeout increase now!
Comment #3
Peter Bowey CreditAttribution: Peter Bowey commentedWith #1 timeout change 1 -> 30 = same issue: (this is after A COLD everything)
Ha!
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedI can not repo this, so I will need your help. Lets try getting rid of stream_set_blocking(). This is the only thing that touches the stream before stream_select().
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedOnce you've ruled that out; we can try getting rid of the STREAM_CLIENT_ASYNC_CONNECT flag. This patch will do that.
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedscratch #5, use this one AFTER testing #4
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedI need a break...
scratch #5 & #6, use this one AFTER testing #4
Comment #8
Peter Bowey CreditAttribution: Peter Bowey commented#4 gave the same results!
Now trying #7
Comment #9
Peter Bowey CreditAttribution: Peter Bowey commented#7 Patch solved the issue!
That was tested with *all caches / storage* = NULL
Notes: I see that we have removed the option "_ASYNC_CONNECT"
Have the break Mike!
Many thanks for your time.
Comment #10
mikeytown2 CreditAttribution: mikeytown2 commentedI would like to use async connect if it is possible. Going to see if stream_get_meta_data() will do the trick for us. Mind testing this last patch for me?
Comment #11
Peter Bowey CreditAttribution: Peter Bowey commentedRefer #10
@mikeytown2,
thanks Mike will test that *patch* within the next 1 hour!
Comment #12
Peter Bowey CreditAttribution: Peter Bowey commentedRefer #10
Results:
Comment #13
mikeytown2 CreditAttribution: mikeytown2 commentedbummer that stream_get_meta_data doesn't fly. Thanks for testing!
I've committed this patch.
Comment #14
Peter Bowey CreditAttribution: Peter Bowey commentedRefer #13
@mikeytown2, many thanks!
So 'sadly' we lose PHP's 'STREAM_CLIENT_ASYNC_CONNECT', so no 'non-blocking' mode..
Comment #15
mikeytown2 CreditAttribution: mikeytown2 commentedWe still get async on writing to the connection, just not on establishing the connection. It's a very minor slowdown for what we're doing. Just wondering, what version of PHP are you using?
Comment #16
Peter Bowey CreditAttribution: Peter Bowey commentedRefer #15
Notes: PHP-FPM is unix:socket connected via Nginx 'upstream' pooling =>
server unix:/tmp/php-fastcgi.socket max_fails=2 fail_timeout=20s;
and PHP CLI:
Comment #17
mikeytown2 CreditAttribution: mikeytown2 commentedHmmm I'm using 5.2.10. Sounds like they broke it; it's not a well used code path as it's kinda complicated to get working correctly.
Comment #18
Peter Bowey CreditAttribution: Peter Bowey commentedRefer #17
'PHP 5.3.x 'broken' async_streams'
Yes that is likely, I did write a working routine for this *newer* version once, but it was harder than the doc's state.
Comment #19
mikeytown2 CreditAttribution: mikeytown2 commentedI've created a new issue to re-enable this as a feature request #1194820: Detect if STREAM_CLIENT_ASYNC_CONNECT doesn't work on server. Sounds like STREAM_CLIENT_ASYNC_CONNECT will work for me, but not for you. It's a shame, but that's how it goes sometimes.
Comment #21
alexx90 CreditAttribution: alexx90 commentedI'm having this problem using advagg module
warning: Invalid argument supplied for foreach() in /home/pa2230rd/mysite/sites/all/modules/advagg/advagg.module on line 2534.
Comment #22
mikeytown2 CreditAttribution: mikeytown2 commented@alexx90
Thats a new issue, next time create a new issue for it. #1405360: warning: Invalid argument supplied for foreach()