Ticket #1236 (closed defect: worksforme)
requests to same url sometimes hang
|Reported by:||reinhard||Owned by:|
The problem is, that if a script with some parameters takes a long time to execute it sometimes happens, that a call to the script with other parameters hangs till the first long running call is finished.
we use a plain centos 6.3 with the newest varnish 3.0.3 rpms from http://repo.varnish-cache.org/redhat/varnish-3.0/el6/x86_64/.
We were able to reproduce this behavior with the following setup. It doesn't happens always but on the server i tested it around 1 in 3 times so it should be fairly easy to reproduce. Attached is the script test.php. The important part is that the script sleeps 30 seconds if it is called with the parameter t=1 otherwise it returns some output i used in debugging the problem.
The following steps must be done to reproduce the problem:
1.) restart varnish
2.) call the script with the parameter that the script takes a long time to finish: curl -i -H "host: test.de" 'localhost:6081/test.php?t=1&time='`date +%H_%M_%S`
3.) call the script with a parameter that finish fast. The first call always works and don't hang: curl -i -H "host: test.de" 'localhost:6081/test.php?t=2&time='`date +%H_%M_%S`
4.) call the script with a parameter that finish fast a second time immediately afterwards: curl -i -H "host: test.de" 'localhost:6081/test.php?t=3&time='`date +%H_%M_%S`
If i waited to long with the third call, i wasn't able to reproduce the problem. Even if i was fast only around 1 in 3 attempts showed the problem: The call waited till the first call was finished before initiating a connection to the backend server.
I have also attached the log file of varnishlog -u -O -w varnish2.log during the execution. The problem also occurs with varnish 2.1.5. Please let me know if you need further informations.
- Status changed from new to closed
- Resolution set to worksforme