kazuho/p5-Parallel-Scoreboard — pull request #3 by karenetheridge (2013-03-01 19:21:47+00:00)
Title: Topic/parallel cleanup

A few times a week on some of my PSGI servers running 50-100 simultaneous workers, I get this type of error:

Parallel::Scoreboard:130 - failed to remove an obsolete scoreboard file:server-status/status_27543:No such file or directory at /home/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Parallel/Scoreboard.pm line 130.

This seems to be caused by two workers being queried for /server-status (by way of Plack::Middleware::ServerStatus::Lite, which uses Parallel::Scoreboard) at the same time, causing two processes to call read_all() at the same time. One of the processes cleans up an obsolete file after the other process calls glob(), but before it calls unlink(), generating an ENOENT error.

This patch checks for that type of error before warning.