Dear all

I have a problem with my Varnish installation when I try to stream mp3 files 
through Varnish Cache 4. This is the scenario.

I have a Drupal website in which editors can upload mp3s. These mp3s are listed 
in a section of website and the end user can listen using an HTML 5 player.
The stack is: Varnish 4 <-> Nginx 1.11<-> Drupal 7 on a GNU/Linux Debian 
Jessie. Varnish and Nginx are installed with Debian packages.

My Varnish configuration is here: https://pastebin.com/8Kw1b2mL 
<https://pastebin.com/8Kw1b2mL>

When I try to listen an mp3 directly through Nginx all works well: player loads 
the file and I can listen the mp3. If I try to do the same through Varnish, the 
player remains in loading and mp3 doesn’t start. I tried to download the mp3 
file using curl and my request goes in timeout.

I had a look at varnishlog and this is the output:

*   << Request  >> 1409738
-   Begin          req 1246052 rxreq
-   Timestamp      Start: 1552587068.541997 0.000000 0.000000
-   Timestamp      Req: 1552587068.541997 0.000000 0.000000
-   ReqStart       93.147.150.135 15330
-   ReqMethod      GET
-   ReqURL         
/sites/default/files/audio/radio_interviews/20180927-rds-gr_rds_1700-170602593m_1.mp3
-   ReqProtocol    HTTP/1.1
-   ReqHeader      Host: www.xxx.it <http://www.xxx.it/>
-   ReqHeader      Connection: keep-alive
-   ReqHeader      Pragma: no-cache
-   ReqHeader      Cache-Control: no-cache
-   ReqHeader      Accept-Encoding: identity;q=1, *;q=0
-   ReqHeader      User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36
-   ReqHeader      chrome-proxy: frfr
-   ReqHeader      Accept: */*
-   ReqHeader      Referer: http://www.xxx.it/path/to/url 
<http://www.xxx.it/path/to/url>
-   ReqHeader      Accept-Language: en-US,en;q=0.9,es;q=0.8,fr;q=0.7,it;q=0.6
-   ReqHeader      Cookie: SESScookieagreed=2; has_js=1; 
_ga=GA1.2.950111086.1552579260; _gid=GA1.2.112403313.1552579260; 
__atuvc=2%7C11; _gat_UA-57096474-1=1
-   ReqHeader      Range: bytes=0-
-   ReqHeader      X-Forwarded-For: 93.147.150.135
-   VCL_call       RECV
-   VCL_acl        NO_MATCH allowed_monitors
-   ReqUnset       X-Forwarded-For: 93.147.150.135
-   ReqHeader      X-Forwarded-For: 93.147.150.135, 93.147.150.135
-   ReqURL         
/sites/default/files/audio/radio_interviews/20180927-rds-gr_rds_1700-170602593m_1.mp3
-   ReqHeader      x-range: bytes=0-
-   ReqUnset       Cookie: SESScookieagreed=2; has_js=1; 
_ga=GA1.2.950111086.1552579260; _gid=GA1.2.112403313.1552579260; 
__atuvc=2%7C11; _gat_UA-57096474-1=1
-   VCL_return     hash
-   ReqUnset       Accept-Encoding: identity;q=1, *;q=0
-   VCL_call       HASH
-   ReqUnset       Range: bytes=0-
-   VCL_return     lookup
-   Hit            229378
-   VCL_call       HIT
-   VCL_return     fetch
-   VCL_Error      change return(fetch) to return(miss) in vcl_hit{}
-   VCL_call       MISS
-   VCL_return     fetch
-   Link           bereq 1409739 fetch
-   Timestamp      Fetch: 1552587068.542520 0.000523 0.000523
-   RespProtocol   HTTP/1.1
-   RespStatus     200
-   RespReason     OK
-   RespHeader     Server: nginx/1.11.5
-   RespHeader     Date: Thu, 14 Mar 2019 18:11:08 GMT
-   RespHeader     Last-Modified: Fri, 28 Sep 2018 08:26:56 GMT
-   RespHeader     ETag: "5bade5d0-a0b94"
-   RespHeader     Content-Type: audio/mpeg
-   RespHeader     Content-Length: 658324
-   RespHeader     X-Cacheable: YES
-   RespHeader     X-Varnish: 1409738
-   RespHeader     Age: 0
-   RespHeader     Via: 1.1 varnish-v4
-   VCL_call       DELIVER
-   RespHeader     X-Cache: MISS
-   RespHeader     X-Cookie:
-   RespHeader     grace:
-   RespHeader     X-Varnish-Server: www.xxx.it <http://www.xxx.it/>
-   VCL_return     deliver
-   Timestamp      Process: 1552587068.542536 0.000539 0.000016
-   RespHeader     Accept-Ranges: bytes
-   Debug          "RES_MODE 2"
-   RespHeader     Connection: keep-alive
-   Debug          "Hit idle send timeout, wrote = 247608/658701; retrying"
-   Debug          "Write error, retval = -1, len = 411093, errno = Resource 
temporarily unavailable"
-   Timestamp      Resp: 1552587188.539239 119.997242 119.996703
-   ReqAcct        733 0 733 377 658324 658701
-   End

I’m not a Varnish “guru”, but it seems that the error is:

-   Debug          "Hit idle send timeout, wrote = 247608/658701; retrying"
-   Debug          "Write error, retval = -1, len = 411093, errno = Resource 
temporarily unavailable"

I search a lot on Google but I didn’t find anything about that, except for a 
timeout problem that doesn’t seem to me because timeout settings are set to 60s 
(first_byte), same as Nginx.

Any help is really appreciated. If you need some other infos, let me know.

Thanks in advance
Daniele
Daniele Piaggesi

Mobile: +39 393 880 78 50
Skype: g0blin79
E-mail: [email protected]
------------------------------------------
Bonsaimeme S.r.l.
Via del Porto Fluviale, 9
00154 Roma - Italy

Phone:  +39 06 98 26 04 39 
Fax:  +39 06 94 81 02 03
-------------------------------------------
bmeme.com <http://bmeme.com/>


*** Prima di stampare, pensa all'ambiente! ***
*** Before printing think about environment and costs ***


Le informazioni, i dati e le notizie contenute nella presente comunicazione e i 
relativi allegati sono di natura privata e come tali possono essere riservate e 
sono, comunque, destinate esclusivamente ai destinatari indicati in epigrafe. 
La diffusione, distribuzione e/o la copiatura del documento trasmesso da parte 
di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi 
dell’art. 616 c.p., sia ai sensi del D.Lgs. n. 196/2003. Se avete ricevuto 
questo messaggio per errore, vi preghiamo di distruggerlo e di darcene 
immediata comunicazione anche inviando un messaggio all’indirizzo email:  
[email protected] <mailto:[email protected]>. Il testo della email potrebbe 
contenere opinioni personali e non necessariamente riconducibili a quelle di 
Bonsaimeme S.r.l.

--- --- ---

This e-mail (including attachments) is intended only for the recipient(s) named 
above. It may contain confidential or privileged information and should not be 
read, copied or otherwise used by any other person. If you are not the named 
recipient, please contact: [email protected] <mailto:[email protected]> and 
delete the e-mail from your system. Rif. D.L. 196/2003.

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to