Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When accessing "/admin/reports/varnish", sometimes it returned the output of the "stats" command on Varnish Admin, and sometimes just an empty page. And on the reports it always had a "Socket error: Resource temporarily unavailable".
So I dug into that, and did a little fix myself that solves the problem (patch included). The problem is related with timeouts connecting to the Varnish Admin.
Also, I think that the module should be rewritten to use Streams instead of Sockets.
Regards,
Pedro de Oliveira
Comment | File | Size | Author |
---|---|---|---|
varnish-socket_error.patch | 996 bytes | falsovsky |
Comments
Comment #1
manarth CreditAttribution: manarth commentedThere are also related patches at http://drupal.org/node/977882 and http://drupal.org/node/969810.
It's probably worth reviewing the overlap between these patches to see which combination is worth accepting.
Comment #2
falsovsky CreditAttribution: falsovsky commentedYes I know, but none of them worked for me. Thats why I tried to do a fix myself.
Comment #3
fgmIt seems the main point of this fix is to massively increase the timeout value, as in #969810: Socket error with remote varnish. Can we admit this is a duplicate ?
Or do you also meet a problem when not using socket_recv() as you did ? The problem with this is that if you invoke socket_recv with MSG_WAITALL as you did, the data received may be incomplete and you then need to handler incorrect data.
Comment #4
MiSc CreditAttribution: MiSc commentedAs a part of a clean up of the issue queue for the varnish module I am closing tickets that had no activity for the last year, please feel free to re-open if needed.