Hi Matthias,

Please find my answers below.

On 11.08.2014 2:45, Matthias Kilian wrote:
[cc: and reply-to: ports, because I thinkg that's the better place
for this problem]

On Sun, Aug 10, 2014 at 11:02:38AM +0400, Denis Lapshin wrote:
After 24-48 hours of Polipo working all the HTTP proxy clients get "To many
open files" error.
That's an error message produced by polipo?

The exact error message is:

504 Connect to www.server.com:80 failed: Too many open files
The following error occurred while trying to access *http://www.server.com/*:
*504 Connect to www.server.com:80 failed: Too many open files*
------------------------------------------------------------------------
Generated Mon, 11 Aug 2014 09:23:14 MSK by Polipo

Is there a bug?
Probably, allthough I didn't run into any fd leaks. But I'm using
polipo only at home, with a very small number of clients (three or
four).
This polipo server is using by one client only. So maximum traffic which can be generated to the server is a normal web surfing traffic by single user.
Restarting Polipo from /etc/rc.d/polipo solves the problem for about 24
hours before the error appears again.
Can you check with fstat(1) how many clients are connected and how
many connections polipo has to the outside, right after the start,
after a few hours, and after the fd exhaustion happens?

Using fstat (when error is generated) I can see about 40 TCP connections (server listening on localhost only, all the traffic from local network redirects by pf to polipo port).
It has about 20 open files. Please find fstat listing below:

_polipo  polipo     27445 text /usr       473655 -r-xr-xr-x   r 240984
_polipo  polipo     27445   wd /           49924 drwx------   r 512
_polipo polipo 27445 0* internet stream tcp 0xfffffe813aab1b58 127.0.0.1:8123 _polipo polipo 27445 1* unix dgram 0xffff80000145fe00 <-> 0xffff800000653e80
_polipo  polipo     27445    2 /home     3568896 -rw-------  rw 5810
_polipo  polipo     27445    3 /home     3464324 -rw-------  rw 886
_polipo  polipo     27445    4 /home     3463879 -rw-------  rw 179915
_polipo  polipo     27445    5 /home     3568904 -rw-------  rw 898
_polipo  polipo     27445    6 /home     3568895 -rw-------  rw 32732
_polipo  polipo     27445    7 /home     3574586 -rw-------  rw 7597
_polipo polipo 27445 8* internet stream tcp 0xfffffe8130d61488 127.0.0.1:8123 <-- 10.0.10.10:4971 _polipo polipo 27445 9* internet stream tcp 0xfffffe8130d61028 127.0.0.1:43346 --> 127.0.0.1:9050
_polipo  polipo     27445   10 /home     3574594 -rw-------  rw 481
_polipo  polipo     27445   11 /home     3574592 -rw-------  rw 845
_polipo  polipo     27445   12 /home     3574593 -rw-------  rw 5403
_polipo  polipo     27445   13 /home     3574587 -rw-------  rw 5763
_polipo  polipo     27445   14 /home     3574588 -rw-------  rw 1386
_polipo polipo 27445 15* internet stream tcp 0xfffffe813aab16f8 127.0.0.1:8123 <-- 10.0.10.10:1290
_polipo  polipo     27445   16 /home     3574589 -rw-------  rw 1168
_polipo  polipo     27445   17 /home     3574566 -rw-------  rw 28672
_polipo polipo 27445 18* internet stream tcp 0xfffffe813043cb38 127.0.0.1:8123 <-- 10.0.10.10:4372
_polipo  polipo     27445   19 /home     3574590 -rw-------  rw 35273
_polipo polipo 27445 20* internet stream tcp 0xfffffe813a101710 127.0.0.1:8123 <-- 10.0.10.10:4972 _polipo polipo 27445 21* internet stream tcp 0xfffffe813a101940 127.0.0.1:27036 --> 127.0.0.1:9050
_polipo  polipo     27445   22 /home     3574591 -rw-------  rw 41652
_polipo polipo 27445 23* internet stream tcp 0xfffffe813670faf0 127.0.0.1:8123 <-- 10.0.8.6:1562
_polipo  polipo     27445   24 /home     3574570 -rw-------  rw 21378
_polipo  polipo     27445   25 /home     3574379 -rw-------  rw 2954
_polipo  polipo     27445   27 /home     3574595 -rw-------  rw 497
_polipo  polipo     27445   28 /home     3574597 -rw-------  rw 37603
_polipo  polipo     27445   29 /home     3574565 -rw-------  rw 47484
_polipo  polipo     27445   30 /home     3464323 -rw-------  rw 3336
_polipo  polipo     27445   31 /home     3464322 -rw-------  rw 1086
_polipo  polipo     27445   32 /home     3464329 -rw-------  rw 909
_polipo  polipo     27445   33 /home     3464330 -rw-------  rw 1031
_polipo  polipo     27445   34 /home     3464328 -rw-------  rw 860
_polipo polipo 27445 35* internet stream tcp 0xfffffe813043c908 127.0.0.1:3800 --> 127.0.0.1:9050
_polipo  polipo     27445   36 /home     3464327 -rw-------  rw 814
_polipo  polipo     27445   37 /home     3464314 -rw-------  rw 141637
_polipo polipo 27445 39* internet stream tcp 0xfffffe8137d55018 127.0.0.1:22953 --> 127.0.0.1:9050 _polipo polipo 27445 40* internet stream tcp 0xfffffe813aab1298 127.0.0.1:8123 <-- 10.0.10.10:1297 _polipo polipo 27445 41* internet stream tcp 0xfffffe8137d556a8 127.0.0.1:8123 <-- 10.0.10.10:1109 _polipo polipo 27445 42* internet stream tcp 0xfffffe8126b5e4c8 127.0.0.1:8123 <-- 10.0.10.10:1291 _polipo polipo 27445 43* internet stream tcp 0xfffffe81365dd020 127.0.0.1:18253 --> 127.0.0.1:9050 _polipo polipo 27445 44* internet stream tcp 0xfffffe8126b5e068 127.0.0.1:17928 --> 127.0.0.1:9050 _polipo polipo 27445 45* internet stream tcp 0xfffffe8137d55478 127.0.0.1:47850 --> 127.0.0.1:9050
_polipo  polipo     27445   46 /home     3574596 -rw-------  rw 3980
_polipo polipo 27445 47* internet stream tcp 0xfffffe813670f460 127.0.0.1:25200 --> 127.0.0.1:9050 _polipo polipo 27445 48* internet stream tcp 0xfffffe8137d558d8 127.0.0.1:8123 <-- 10.0.10.10:4446 _polipo polipo 27445 49* internet stream tcp 0xfffffe813a101da0 127.0.0.1:24203 --> 127.0.0.1:9050 _polipo polipo 27445 50* internet stream tcp 0xfffffe812aa16b08 127.0.0.1:8123 <-- 10.0.10.10:4373
_polipo  polipo     27445   51 /home     3574568 -rw-------  rw 44821
_polipo polipo 27445 52* internet stream tcp 0xfffffe81365ddb10 127.0.0.1:8123 <-- 10.0.10.10:1589
_polipo  polipo     27445   53 /home     3574567 -rw-------  rw 66225
_polipo polipo 27445 54* internet stream tcp 0xfffffe813561d8e0 127.0.0.1:8123 <-- 10.0.10.10:1314 _polipo polipo 27445 55* internet stream tcp 0xfffffe813a101080 127.0.0.1:32877 --> 127.0.0.1:9050 _polipo polipo 27445 56* internet stream tcp 0xfffffe8138bd02c8 127.0.0.1:12059 --> 127.0.0.1:9050
_polipo  polipo     27445   57* internet stream tcp 0x0 *:0
_polipo polipo 27445 58* internet stream tcp 0xfffffe812aa16248 127.0.0.1:16981 --> 127.0.0.1:9050 _polipo polipo 27445 61* internet stream tcp 0xfffffe8132c4c508 127.0.0.1:8123 <-- 10.0.10.10:4448 _polipo polipo 27445 62* internet stream tcp 0xfffffe8126b5ed88 127.0.0.1:8123 <-- 10.0.10.10:1120 _polipo polipo 27445 63* internet stream tcp 0xfffffe8126b5e6f8 127.0.0.1:20474 --> 127.0.0.1:9050 _polipo polipo 27445 64* internet stream tcp 0xfffffe8126b5e928 127.0.0.1:8123 <-- 10.0.10.10:1121 _polipo polipo 27445 65* internet stream tcp 0xfffffe8138bd0098 127.0.0.1:41421 --> 127.0.0.1:9050 _polipo polipo 27445 66* internet stream tcp 0xfffffe8126b5e298 127.0.0.1:8123 <-- 10.0.10.10:1122 _polipo polipo 27445 67* internet stream tcp 0xfffffe8138bd04f8 127.0.0.1:2628 --> 127.0.0.1:9050 _polipo polipo 27445 68* internet stream tcp 0xfffffe8138bd0958 127.0.0.1:8123 <-- 10.0.10.10:1123 _polipo polipo 27445 69* internet stream tcp 0xfffffe8138bd0b88 127.0.0.1:43863 --> 127.0.0.1:9050 _polipo polipo 27445 70* internet stream tcp 0xfffffe8132c4c0a8 127.0.0.1:37830 --> 127.0.0.1:9050 _polipo polipo 27445 71* internet stream tcp 0xfffffe813502f2d0 127.0.0.1:8123 <-- 10.0.10.10:1620 _polipo polipo 27445 73* internet stream tcp 0xfffffe81365ddd40 127.0.0.1:35222 --> 127.0.0.1:9050
_polipo  polipo     27445   75* internet stream tcp 0x0 *:0
_polipo polipo 27445 78* internet stream tcp 0xfffffe8132c4c968 127.0.0.1:8123 <-- 10.0.10.10:1324 _polipo polipo 27445 79* internet stream tcp 0xfffffe8132c4c738 127.0.0.1:2838 --> 127.0.0.1:9050 _polipo polipo 27445 80* internet stream tcp 0xfffffe8132c4cb98 127.0.0.1:8123 <-- 10.0.10.10:1325 _polipo polipo 27445 81* internet stream tcp 0xfffffe8132c4cdc8 127.0.0.1:20782 --> 127.0.0.1:9050 _polipo polipo 27445 82* internet stream tcp 0xfffffe8132c4c2d8 127.0.0.1:8123 <-- 10.0.10.10:1326 _polipo polipo 27445 83* internet stream tcp 0xfffffe812ae0d2b0 127.0.0.1:44310 --> 127.0.0.1:9050
_polipo  polipo     27445   86 /home     3464311 -rw-------  rw 1598
_polipo polipo 27445 88* internet stream tcp 0xfffffe813670f690 127.0.0.1:8123 <-- 10.0.10.10:1333 _polipo polipo 27445 89* internet stream tcp 0xfffffe8135a514d8 127.0.0.1:36909 --> 127.0.0.1:9050
_polipo  polipo     27445   94* internet stream tcp 0x0 *:0
_polipo  polipo     27445   98 /home     3464331 -rw-------  rw 9876
_polipo polipo 27445 102* internet stream tcp 0xfffffe813043c048 127.0.0.1:8123 <-- 10.0.10.10:2330 _polipo polipo 27445 103* internet stream tcp 0xfffffe813043cd68 127.0.0.1:8123 <-- 10.0.10.10:2331 _polipo polipo 27445 105* internet stream tcp 0xfffffe812aa16018 127.0.0.1:1718 --> 127.0.0.1:9050 _polipo polipo 27445 106* internet stream tcp 0xfffffe812aa16478 127.0.0.1:44651 --> 127.0.0.1:9050 _polipo polipo 27445 109* internet stream tcp 0xfffffe8126a71d60 127.0.0.1:8123 <-- 10.0.10.10:1637 _polipo polipo 27445 112* internet stream tcp 0xfffffe81377fad28 127.0.0.1:30938 --> 127.0.0.1:9050 _polipo polipo 27445 113* internet stream tcp 0xfffffe81377fa468 127.0.0.1:8123 <-- 10.0.10.10:1640 _polipo polipo 27445 114* internet stream tcp 0xfffffe813729a028 127.0.0.1:21786 --> 127.0.0.1:9050 _polipo polipo 27445 115* internet stream tcp 0xfffffe81377fa8c8 127.0.0.1:8123 <-- 10.0.10.10:1641 _polipo polipo 27445 116* internet stream tcp 0xfffffe813729ad48 127.0.0.1:14189 --> 127.0.0.1:9050 _polipo polipo 27445 124* internet stream tcp 0xfffffe81352d2948 127.0.0.1:8123 <-- 10.0.10.10:2343 _polipo polipo 27445 125* internet stream tcp 0xfffffe81352d2b78 127.0.0.1:20258 --> 127.0.0.1:9050 _polipo polipo 27445 126* internet stream tcp 0xfffffe81352d2da8 127.0.0.1:8123 <-- 10.0.10.10:2344 _polipo polipo 27445 127* internet stream tcp 0xfffffe81352d2718 127.0.0.1:13647 --> 127.0.0.1:9050

Just after restart:

# fstat | grep polipo
_polipo  polipo     12661 text /usr       473655 -r-xr-xr-x   r 240984
_polipo  polipo     12661   wd /           49924 drwx------   r 512
_polipo polipo 12661 0* internet stream tcp 0xfffffe813502f730 127.0.0.1:8123 _polipo polipo 12661 1* unix dgram 0xffff8000016a9980 <-> 0xffff800000653e80 _polipo polipo 12661 2* internet stream tcp 0xfffffe813502f500 127.0.0.1:8123 <-- 10.0.10.10:3169 _polipo polipo 12661 3* internet stream tcp 0xfffffe813729a488 127.0.0.1:45872 --> 127.0.0.1:9050 _polipo polipo 12661 4* internet stream tcp 0xfffffe813729ad48 127.0.0.1:8123 <-- 10.0.10.10:3170 _polipo polipo 12661 5* internet stream tcp 0xfffffe813729a028 127.0.0.1:36162 --> 127.0.0.1:9050 _polipo polipo 12661 8* internet stream tcp 0xfffffe81377fad28 127.0.0.1:8123 <-- 10.0.10.10:3171 _polipo polipo 12661 9* internet stream tcp 0xfffffe813561d6b0 127.0.0.1:48550 --> 127.0.0.1:9050 _polipo polipo 12661 10* internet stream tcp 0xfffffe812ae0d710 127.0.0.1:8123 <-- 10.0.10.10:3173 _polipo polipo 12661 11* internet stream tcp 0xfffffe812ae0d2b0 127.0.0.1:23601 --> 127.0.0.1:9050


Ciao
        Kili

ps: polipo-1.0.4.1 is outdated, i'll test polipo-1.1.1 a little bit
and send a diff to ports@ if everything works well.

--
Denis Lapshin
mailto: den...@mindall.org

Reply via email to