MiniDLNA log filling disk

MiniDLNA log filling disk

Postby rafesl » Tue Nov 19, 2013 11:01 am

I've had a problem with disk space disappearing for a while that I've just tracked down.
It looks like the MiniDLNA log goes nuts.

I know I could drop in a cron to nuke the file once per hour or similar, but has anyone else had this happen to them?
The file seems to be be written at a rate of multiple MB / minute.

Rafe

---

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 247968 174728 60440 74% /
/dev/sda2 247968 174728 60440 74% /
/dev/sda5 790540 17736 764772 2% /rw_fs
tmpfs 5000 300 4700 6% /rw_fs/tmp/usr/var
/dev/sda8 150999720 150999720 0 100% /share/1000
/dev/sdb1 488384000 374127460 114256540 77% /rw_fs/tmp/mnt/External_1
/dev/sdb1 488384000 374127460 114256540 77% /share/1000/External_1
/dev/root 198368 122328 65800 65% /lacie-boot


root@moviestore:/share/1000 # cd /share/1000/minidlna/database/
root@moviestore:/share/1000/minidlna/database # ls -la
total 56238652
drwxr-xr-t 3 root root 4096 2013-10-21 02:39 .
drwxrwxrwx 3 root root 4096 2013-10-02 01:23 ..
drwxr-xr-x 3 root root 4096 2013-10-21 02:39 art_cache
-rw-r--r-- 1 root root 8818688 2013-11-18 06:02 files.db
-rw-r--r-- 1 root root 57523294208 2013-11-20 05:09 minidlna.log


root@moviestore:/share/1000/minidlna/database # tail minidlna.log
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open files
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open files
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open files
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open files
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open files
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open files
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open files
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open files
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open files
[2013/11/18 23:19:46] minidlna.c:1294: error: accept(http): Too many open
rafesl
Donator VIP
Donator VIP
 
Posts: 39
Joined: Mon Jul 16, 2012 11:48 am

Re: MiniDLNA log filling disk

Postby Jocko » Tue Nov 19, 2013 3:27 pm

Hi rafesl,

it seems that minidlna reaches a system limit (max number of open file in the same time).

Currently the default system limit is 1024 (soft limit). To check that do it:
-read the pid of minidlna
Code: Select all
cat /var/run/minidlna.pid

-see how many files are opened by minidlna
Code: Select all
ls -l /proc/pid/fd
(change 'pid' by the number got previously)
So in this folder, the number of symlinks gives the number of opened files.

Then I think you must get 1023 (or 4095 hard limit).

Next step is to understand why minidlna reachs this limit (search on your dlna clients side or minidlna tries to update the database with many new files...)
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: MiniDLNA log filling disk

Postby rafesl » Wed Nov 20, 2013 9:41 am

Thanks for that.
I'll have a look in the next few evenings and check.
rafesl
Donator VIP
Donator VIP
 
Posts: 39
Joined: Mon Jul 16, 2012 11:48 am

Re: MiniDLNA log filling disk

Postby hardy74 » Wed Nov 20, 2013 9:28 pm

I use MiniDLNA from several devices pretty heavily, and the log is about 1 MB, with data since January. So no problem here.
hardy74
 
Posts: 41
Joined: Wed Nov 07, 2012 3:43 am

Re: MiniDLNA log filling disk

Postby rafesl » Tue Dec 17, 2013 4:36 pm

root@moviestore:/ # ls -l /proc/1081/fd |more
total 0
lrwx------ 1 root root 64 2013-12-19 00:43 0 -> /dev/null
lrwx------ 1 root root 64 2013-12-19 00:43 1 -> /dev/null
lrwx------ 1 root root 64 2013-12-19 00:43 10 -> socket:[241142]
lrwx------ 1 root root 64 2013-12-19 00:43 100 -> socket:[240648]
lrwx------ 1 root root 64 2013-12-19 00:43 1000 -> socket:[249788]
lrwx------ 1 root root 64 2013-12-19 00:43 1001 -> socket:[249784]
lrwx------ 1 root root 64 2013-12-19 00:43 1002 -> socket:[249801]
lrwx------ 1 root root 64 2013-12-19 00:43 1003 -> socket:[249809]
lrwx------ 1 root root 64 2013-12-19 00:43 1004 -> socket:[249805]
lrwx------ 1 root root 64 2013-12-19 00:43 1005 -> socket:[249844]
lrwx------ 1 root root 64 2013-12-19 00:43 1006 -> socket:[249852]
lrwx------ 1 root root 64 2013-12-19 00:43 1007 -> socket:[249848]


lots and lots of those "socket" files are listed.

Sorry its been a while since I checked this but family life being what it is I dont get to sort this kind of thing as much as I used.
rafesl
Donator VIP
Donator VIP
 
Posts: 39
Joined: Mon Jul 16, 2012 11:48 am

Re: MiniDLNA log filling disk

Postby rafesl » Tue Dec 17, 2013 4:50 pm

I just applied the minidlna service control fix.

I'll see if that fixes things.

ty

Rafe
rafesl
Donator VIP
Donator VIP
 
Posts: 39
Joined: Mon Jul 16, 2012 11:48 am

Re: MiniDLNA log filling disk

Postby rafesl » Fri Dec 20, 2013 10:23 am

I've checked the log and since applying the fix I haven't had any issue.

Thank you.

Rafe
rafesl
Donator VIP
Donator VIP
 
Posts: 39
Joined: Mon Jul 16, 2012 11:48 am

Re: MiniDLNA log filling disk

Postby Jocko » Fri Dec 20, 2013 2:02 pm

Glad to heard this rafesl :-D

So maybe as minidlna didn't know where the pid file was saved without the patch, it didn't succeed to find its child threads and close the opened files...
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France


Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 4 guests