runScheduledTasks.php throwing errors

I’m getting many errors since I upgraded to 2.4.8.2 complaining about missing:

  • fc-pluginSettings-0-backupplugin.php
  • fc-pluginSettings-0-browseplugin.php
  • fc-pluginSettings-0-staticpagesplugin.php
  • fc-pluginSettings-0-dataverseplugin.php

from the ‘cache’ directory when I run the following on cron:

# OJS PKP Statistics (roda 01:00)
0 1 * * *       /usr/local/bin/php $HOME/public_html/tools/runScheduledTasks.php $HOME/public_html/plugins/generic/usageStats/scheduledTasksAutoStage.xml

# OJS PKP PLN (LOCKSS)
0 1 * * *       /usr/local/bin/php $HOME/public_html/tools/runScheduledTasks.php $HOME/public_html/plugins/generic/pln/xml/scheduledTasks.xml

# OJS Crossref
0 1 * * *       /usr/local/bin/php $HOME/public_html/tools/runScheduledTasks.php $HOME/public_html/plugins/importexport/crossref/scheduledTasks.xml

The warning/errors are like that:

ojs2 has produced an error
  Message: WARNING: include(/usr/home/seer/public_html/cache/fc-pluginSettings-0-dataverseplugin.php): failed to open stream: No such file or directory
  In file: /usr/home/seer/public_html/lib/pkp/classes/cache/FileCache.inc.php
  At line: 44
  Stacktrace:
  Server info:
   OS: FreeBSD
   PHP Version: 5.6.31
   Apache Version: N/A
   DB Driver: mysql
   DB server version: 5.1.66
ojs2 has produced an error
  Message: WARNING: include(): Failed opening '/usr/home/seer/public_html/cache/fc-pluginSettings-0-dataverseplugin.php' for inclusion (include_path='.:/usr/home/seer/public_html/classes:/usr/home/seer/public_html/pages:/usr/home/seer/public_html/lib/pkp:/usr/home/seer/public_html/lib/pkp/classes:/usr/home/seer/public_html/lib/pkp/pages:/usr/home/seer/public_html/lib/pkp/lib/adodb:/usr/home/seer/public_html/lib/pkp/lib/phputf8:/usr/home/seer/public_html/lib/pkp/lib/pqp/classes:/usr/home/seer/public_html/lib/pkp/lib/smarty:.:/usr/local/share/pear')
  In file: /usr/home/seer/public_html/lib/pkp/classes/cache/FileCache.inc.php
  At line: 44
  Stacktrace:
  Server info:
   OS: FreeBSD
   PHP Version: 5.6.31
   Apache Version: N/A
   DB Driver: mysql
   DB server version: 5.1.66
ojs2 has produced an error
  Message: WARNING: unlink(/usr/home/seer/public_html/cache/fc-pluginSettings-0-staticpagesplugin.php): No such file or directory
  In file: /usr/home/seer/public_html/lib/pkp/classes/cache/FileCache.inc.php
  At line: 57
  Stacktrace:
  Server info:
   OS: FreeBSD
   PHP Version: 5.6.31
   Apache Version: N/A
   DB Driver: mysql
   DB server version: 5.1.66

Hi @luizborges,

I see these messages too occasionally. They seem to be due to a rare race condition in the management of cache files; they are cosmetic, i.e. I’ve never seen evidence that they cause problems. I’d like to remove our custom caching code in favour of a third-party library, but this is a low priority, and until then I’d suggest ignoring these messages.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher, ok, I will ignore them. I’m running those task in parallel, do you think that adjusting the time it runs could help it?

They are happening everyday and the strange thing is that those files never seemed to have existed, and the line before it the code is a file exist check…

Hi @luizborges,

Those files are being created/deleted rapidly, hence the race condition. Ignore the warnings; they are annoying, but as far as I can see, they are not a cause for problems.

Regards,
Alec Smecher
Public Knowledge Project Team