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

CommentFileSizeAuthor
varnish-socket_error.patch996 bytesfalsovsky
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

manarth’s picture

There 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.

falsovsky’s picture

Yes I know, but none of them worked for me. Thats why I tried to do a fix myself.

fgm’s picture

It 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.

MiSc’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

As 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.