Issue Details (XML | Word | Printable)

Key: MDLSITE-439
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Martin Dougiamas
Reporter: Howard Miller
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle Community Sites

Python exception viewing CVS file

Created: 12/May/08 01:28 AM   Updated: 16/Apr/09 09:41 AM
Component/s: CVS repository

Participants: Eloy Lafuente (stronk7), Howard Miller, Jordan Tomkinson and Martin Dougiamas
Security Level: None
Resolved date: 12/May/08


 Description  « Hide
Viewing the following link....

http://cvs.moodle.org/contrib/plugins/mod/certificate/lib.php?revision=1.21.2.13&view=markup

Results in...

Traceback (most recent call last):
  File "/usr/local/viewvc/lib/viewvc.py", line 3668, in main
    request.run_viewvc()
  File "/usr/local/viewvc/lib/viewvc.py", line 388, in run_viewvc
    self.view_func(self)
  File "/usr/local/viewvc/lib/viewvc.py", line 1447, in view_markup
    generate_page(request, "markup", data)
  File "/usr/local/viewvc/lib/viewvc.py", line 840, in generate_page
    template.generate(request.server.file(), data)
  File "/usr/local/viewvc/lib/ezt.py", line 326, in generate
    self._execute(self.program, ctx)
  File "/usr/local/viewvc/lib/ezt.py", line 455, in _execute
    step[0](step[1], ctx)
  File "/usr/local/viewvc/lib/ezt.py", line 460, in _cmd_print
    _write_value(value, args, ctx)
  File "/usr/local/viewvc/lib/ezt.py", line 636, in _write_value
    apply(value, [ctx] + list(args))
  File "/usr/local/viewvc/lib/viewvc.py", line 1250, in __call__
    dir = compat.mkdtemp()
  File "/usr/lib/python2.3/tempfile.py", line 308, in mkdtemp
    _os.mkdir(file, 0700)
OSError: [Errno 31] Too many links: '/tmp/tmppA793k'


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas added a comment - 12/May/08 11:10 AM
Seems OK now ...

Howard Miller added a comment - 12/May/08 04:16 PM
Still exactly the same for me. Tried on three different machines at home / at work, and asked a couple of other people to try it too. Logged in or not makes no difference.

Martin Dougiamas added a comment - 12/May/08 08:41 PM
Yep I see it too now.

Martin Dougiamas added a comment - 12/May/08 08:52 PM
OK, fixed. There were too many files in /tmp ... tmpwatch was set to keep 10 days worth of files. That's now been reduced to 5.

Eloy Lafuente (stronk7) added a comment - 31/Mar/09 02:35 AM
Hi,

not sure why but /tmp was full again and tmpwatch (executed from cron.daily) wasn't doing its job, so the files in that dir never became reduced (from 32000). And nothing was working (file view, diffs...)

So I've edited the cron.daily script and changed the line to:

/usr/sbin/tmpwatch -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix -fm 72 /tmp

i.e. I've added the fm switches, to force deletion if root hasn't access + to use modify time, instead of access time. Also I've reduced it to 3 days (72) hours. Now there are only 5166 files.

FYI, Jordan, Martin...ciao


Eloy Lafuente (stronk7) added a comment - 16/Apr/09 02:29 AM
FYI, reduced to 24h.

/tmp was full again.

Ciao


Jordan Tomkinson added a comment - 16/Apr/09 09:41 AM
Ah, i wasn't aware of this bug #..

Tim Hunt notified me of this a couple of days ago and i cleaned /tmp also.
I couldnt find any information on how these folders are being managed, other than its something to do with cvs/viewvc
I wrote a small perl script and put it in crontab to clean the rcs* and tmp* folders that have a last access time of more than 24 hours.

Eloy - should my script stay or be removed?

runs at 12pm (moodle hq time) every day.

#!/usr/bin/perl

  1. clean /tmp so viewvc doesnt fill it up

my @files = `/usr/bin/find /tmp/ -atime +1 -mindepth 1 -maxdepth 1 2>/dev/null |grep '/tmp/rcs
|/tmp/tmp'`;

foreach $file (@files) {
chomp($file);
if (($file ne "/tmp") && ($file ne "/tmp/")) { #print "$file\n"; system("/bin/rm -rf $file"); }
}