Weird writev()-loop when download is cancelled.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

With Apache 2.2.6 (the prefork mpm, on Debian 'SID') i'm seeing weird
behaviour when a (large) download is cancelled by a visitor.

Scenario: User browses to my site, clicks a link to a 1.5G zipfile,
realises it will take ages to download and clicks 'cancel download',
which results in an Apache process eating up ~99% CPU-time and hogging
the system.

Strace shows:

30672 writev(79, [{"1fa0\r\n", 6}, {"\270Q\34"..., 8096}, {"\r\n", 2}], 3) = -1 EPIPE (Broken pipe)
30672 --- SIGPIPE (Broken pipe) @ 0 (0) ---
30672 writev(79, [{"1fa0\r\n", 6}, {"\235:\235"..., 8096}, {"\r\n", 2}], 3) = -1 EPIPE (Broken pipe)
30672 --- SIGPIPE (Broken pipe) @ 0 (0) ---
30672 writev(79, [{"1fa0\r\n", 6}, {"\241\237"..., 8096}, {"\r\n", 2}], 3) = -1 EPIPE (Broken pipe)
30672 --- SIGPIPE (Broken pipe) @ 0 (0) ---

In a continous loop. This happens for each and every request that is
cancelled, so looping apache processes accumulate at a fast rate on a
busy site. While smaller files make processes loop less longer, this
large file poses a problem as it takes some time to writev() 1.5G and
processing the SIGPIPE's.

Why exactly does Apache not stop sending data after receiving a SIGPIPE? ;-)

-Sndr.
-- 
| 42.7 percent of all statistics are made up on the spot.
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8  9BDB D463 7E41 08CE C94D

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux